Type Traits: Categories and Transformations
This lesson is an extension of the previous lesson where we'll study categories and transformations of type traits.
We'll cover the following...
Primary type categories #
C++ has 14 primary type categories. They are complete and orthogonal, meaning that each type is exactly a member of one type category. The check for the type categories is independent of the type qualifiers const or volatile.
The 14 primary type categories are as follows:
Composite type categories #
Based on the 14 primary type categories, there are 7 composite type categories in C++.
Performance - working on the entire memory area #
This idea is quite straightforward and is used in current implementations of the STL. If the elements of a container are simple enough, the algorithm of the STL, such as std::copy, std::fill, or std::equal, will be directly applied to the memory area. Instead of using std::copy to copy the elements individually, the process is completed ...