21 Metaprogramming library [meta]

21.3 Metaprogramming and type traits [type.traits]

21.3.5 Unary type traits [meta.unary]

21.3.5.3 Composite type traits [meta.unary.comp]

These templates provide convenient compositions of the primary type categories, corresponding to the descriptions given in subclause [basic.types].
For any given type T, the result of applying one of these templates to T and to cv T shall yield the same result.
Table 47: Composite type category predicates [tab:meta.unary.comp]
Template
Condition
Comments
template<class T>
struct is_­reference;
T is an lvalue reference or an rvalue reference
template<class T>
struct is_­arithmetic;
T is an arithmetic type ([basic.fundamental])
template<class T>
struct is_­fundamental;
T is a fundamental type ([basic.fundamental])
template<class T>
struct is_­object;
T is an object type ([basic.types.general])
template<class T>
struct is_­scalar;
T is a scalar type ([basic.types.general])
template<class T>
struct is_­compound;
T is a compound type ([basic.compound])
template<class T>
struct is_­member_­pointer;
T is a pointer-to-member type ([basic.compound])