20 General utilities library [utilities]

20.15 Metaprogramming and type traits [meta]

20.15.5 Unary type traits [meta.unary]

20.15.5.2 Primary type categories [meta.unary.cat]

Table 47: Primary type category predicates [tab:meta.unary.cat]
Template
Condition
Comments
template<class T>
struct is_­void;
T is void
template<class T>
struct is_­null_­pointer;
T is nullptr_­t ([basic.fundamental])
template<class T>
struct is_­integral;
T is an integral type ([basic.fundamental])
template<class T>
struct is_­floating_­point;
T is a floating-point type ([basic.fundamental])
template<class T>
struct is_­array;
T is an array type ([basic.compound]) of known or unknown extent
Class template array is not an array type.
template<class T>
struct is_­pointer;
T is a pointer type ([basic.compound])
Includes pointers to functions but not pointers to non-static members.
template<class T>
struct is_­lvalue_­reference;
T is an lvalue reference type ([dcl.ref])
template<class T>
struct is_­rvalue_­reference;
T is an rvalue reference type ([dcl.ref])
template<class T>
struct is_­member_­object_­pointer;
T is a pointer to data member
template<class T>
struct is_­member_­function_­pointer;
T is a pointer to member function
template<class T>
struct is_­enum;
T is an enumeration type ([basic.compound])
template<class T>
struct is_­union;
T is a union type ([basic.compound])
template<class T>
struct is_­class;
T is a non-union class type ([basic.compound])
template<class T>
struct is_­function;
T is a function type ([basic.compound])