Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
Alias Templates
Alias templates for typename foo<T>::type are provided, where "foo" is the template class name. For example, add_const has the alias template for its type add_const_t, defined as:
template<class T>
using add_const_t = typename add_const<T>::type;
add_const_t |
aligned_storage_t |
make_signed_t |
remove_pointer_t |
add_cv_t |
aligned_union_t |
make_unsigned_t |
remove_reference_t |
add_lvalue_reference_t |
common_type_t |
remove_all_extents_t |
remove_volatile_t |
add_pointer_t |
conditional_t |
remove_const_t |
result_of_t |
add_rvalue_reference_t |
decay_t |
remove_cv_t |
underlying_type_t |
add_volatile_t |
enable_if_t |
remove_extent_t |
Classes
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. |
|
Makes an instance of the common type of two types. |
|
Makes an instance of the common type of two types. |
|
Makes non-reference, non-const, or non-volatile type, or makes a pointer to type. |
|
Makes an instance of a type, or an undefined 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 if type doesn't throw on copy construction. |
|
Tests if type doesn't throw on default construction. |
|
Tests whether the type has a trivial assign. |
|
Tests whether the type has a trivial default constructor. |
|
Tests whether the type has a trivial copy constructor. |
|
Tests if type has a trivial copy constructor. |
|
Tests if type has a trivial default constructor. |
|
Tests whether the type has a trivial destructor. |
|
Tests whether the type has a virtual destructor. |
|
Tests whether the type is an abstract class. |
|
Tests whether the type is arithmetic. |
|
Tests whether the type is an 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 if type is an lvalue reference. |
|
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 if type is an rvalue reference. |
|
Tests whether two types are the same. |
|
Tests whether the type is scalar. |
|
Tests whether the type is a signed integer. |
|
Tests if type is a standard layout. |
|
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. |
|
Makes type or the smallest signed type greater than or equal in size to type. |
|
Makes type or the smallest unsigned type greater than or equal in size to type. |
|
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. |
Typedefs
Holds integral constant with false value. |
|
Holds integral constant with true value. |