Concrete Data Types
While different classes vary considerably in the facilities that they provide, there are significant benefits to a class whose objects behave like those of native types. As I've just mentioned, such a class is called a concrete data type. To make a class a concrete data type, we must define certain member functions that allow creation, copying, and deletion to behave as with a native variable.
Susan wanted to see a chart illustrating the correspondence between what the compiler does for a native type and what we have to do to make a type a concrete data type. Of course, I complied with her request (see Figure 6.2).
Figure 6.2. Comparison between native and user-defined types
Because the member functions listed in that chart ...
Get C++: A Dialog Programming with the C++ Standard Library now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.