<type_traits>
Defines templates that provide compile-time constants that give information about the properties of their type arguments.
#include <type_traits>
Remarks
A type predicate is a template that takes one or two type arguments. When a type predicate holds true, it is publicly derived, directly or indirectly, from true_type Typedef. When a type predicate holds false, it is publicly derived, directly or indirectly, from false_type Typedef.
A type modifier is a template that takes one or more template arguments and has one member, as follows:
- typedef modified-type type;
A type query is a template that takes one or more template arguments. A type query is publicly derived, directly or indirectly, from integral_constant<std::size_t, value>. It holds the value that is passed as the argument value.
Declarations
Class |
Description |
---|---|
Makes const type from type. |
|
Makes const/volatile type from type. |
|
Makes pointer to type from type. |
|
Makes reference to type from type. |
|
Makes volatile type from type. |
|
Makes suitably aligned type. |
|
Gets alignment of type. |
|
Gets an array dimension. |
|
Tests whether the type does not throw on assign. |
|
Tests whether the type does not throw on default construction. |
|
Tests whether the type does not throw on copy construction. |
|
Tests whether the type has trivial assign. |
|
Tests whether the type has trivial default constructor. |
|
Tests whether the type has trivial copy constructor. |
|
Tests whether the type has trivial destructor. |
|
Tests whether the type has virtual destructor. |
|
Tests whether the type is abstract class. |
|
Tests whether the type is arithmetic. |
|
Tests whether the type is array. |
|
Tests whether one type is the base of another. |
|
Tests whether the type is a class. |
|
Tests whether the type is not scalar. |
|
Tests whether the type is const. |
|
Tests whether one type is convertible to another. |
|
Tests whether the type is an empty class. |
|
Tests whether the type is an enumeration. |
|
Tests whether the type is floating-point. |
|
Tests whether the type is a function type. |
|
Tests whether the type is void or arithmetic. |
|
Tests whether the type is integral. |
|
Tests whether the type is a pointer to a member function. |
|
Tests whether the type is a pointer to a member object. |
|
Tests whether the type is a pointer to a member. |
|
Tests whether the type is an object type. |
|
Tests whether the type is a POD. |
|
Tests whether the type is a pointer. |
|
Tests whether the type has a virtual function. |
|
Tests whether the type is a reference. |
|
Tests whether two types are the same. |
|
Tests whether the type is scalar. |
|
Tests whether the type is a signed integer. |
|
Tests whether the type is a union. |
|
Tests whether the type is an unsigned integer. |
|
Tests whether the type is void. |
|
Tests whether the type is volatile. |
|
Gets the number of array dimensions. |
|
Makes non-array type from array type. |
|
Makes non-const type from type. |
|
Makes non-const/volatile type from type. |
|
Makes element type from array type. |
|
Makes type from a pointer to type. |
|
Makes non-reference type from type. |
|
Makes non-volatile type from type. |
|
Makes integral constant from type and value. |
Type Definitions
Type |
Description |
---|---|
Holds integral constant with false value. |
|
Holds integral constant with true value. |