The primary type categories correspond to the descriptions given in section [basic.types] of the C++ standard.
For any given type T, the result of applying one of these templates to T and to cv-qualified T shall yield the same result.
[ Note: For any given type T, exactly one of the primary type categories has a value member that evaluates to true. — end note ]
Template | Condition | Comments |
template <class T> struct is_void; | T is void | |
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 ([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 non-static data member | |
template <class T> struct is_member_function_pointer; | T is a pointer to non-static 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 class type but not a union type ([basic.compound]) | |
template <class T> struct is_function; | T is a function type ([basic.compound]) |