Type traits are classes that provide meta-information about types or can be used to modify types. There are actually two categories of type traits:
- Traits that provide information about types, their properties, or their relations (such as is_integer, is_arithmetic, is_array, is_enum, is_class, is_const, is_pod, is_constructible, is_same, and so on). These traits provide a constant bool member called value.
- Traits that modify properties of types (such as add_const, remove_const, add_pointer, remove_pointer, make_signed, make_unsigned, and so on). These traits provide a member typedef called type that represents the transformed type.
Both of these categories of types have been shown in the How to do it... section; examples ...