Footnotes

Chapter 1

1 Note that in C++ a type definition defines a “type alias” rather than a new type. For example:

typedef int Length; // define Length as an alias for int int i = 42; Lengthl = 88; i = l;              // OK l = i;              // OK

Chapter 2

1 For example, if one argument type is defined in namespace std (such as strings), according to the lookup rules of C++, both the global and the std max() template are found.

2 The “one-entity-fits-all” alternative is conceivable but rare in practice. All language rules are based on the concept that different entities are generated.

3 This restriction is mainly the result of a historical glitch in the development of function templates. There are probably no technical hindrances to implementing ...

Get C++ Templates: The Complete Guide 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.