Previous section   Next section

Imperfect C++ Practical Solutions for Real-Life Programming
By Matthew Wilson
Table of Contents
Chapter 4.  Data Encapsulation and Value Types


4.8. Value Types Coda

It's interesting to note how this spectrum of value types is analogous to that of the STL iterator concepts. The most difficult iterator concept to emulate in user-defined types is the random access iterator, but it is the one supported by pointers, which are the simplest to implement insofar as the language already does that for us.

Similarly, the most difficult of the value type concepts to emulate is the arithmetic value type, which again is the default value type of the fundamental integral types. We see how powerful C++ is to let us do such things, and how arcane it is that the syntax of the fundamental types is the high-bar of our achievement.


      Previous section   Next section