O'Reilly logo

Imperfect C++ Practical Solutions for Real-Life Programming by Matthew Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required