Chapter 13. Fundamental Types

Conceptually, a type is defined by a set of values and the operations that may be performed on those values. This is a widely accepted notion of type, and represents the minimum strict definition.

In practice, however, the correct manipulation of types depends not just on a balance between suitability—fitness for purpose—and expressiveness, but also on safety and even “human” factors such as its name. It is important that a type provides you with enough power and flexibility to enable you to clearly and efficiently represent and manipulate the concept you require, but equally important that the range of operations is restricted to a safe and predictable set.

The fundamental types (see Prologue) provided by C++ come ...

Get Imperfect C++ Practical Solutions for Real-Life Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.