Export (0) Print
Expand All

<type_traits>

Defines templates that provide compile-time constants that give information about the properties of their type arguments.

#include <type_traits>

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.

Class

Description

add_const Class

Makes const type from type.

add_cv Class

Makes const/volatile type from type.

add_pointer Class

Makes pointer to type from type.

add_reference Class

Makes reference to type from type.

add_volatile Class

Makes volatile type from type.

aligned_storage Class

Makes suitably aligned type.

alignment_of Class

Gets alignment of type.

extent Class

Gets an array dimension.

has_nothrow_assign Class

Tests whether the type does not throw on assign.

has_nothrow_constructor Class

Tests whether the type does not throw on default construction.

has_nothrow_copy Class

Tests whether the type does not throw on copy construction.

has_trivial_assign Class

Tests whether the type has trivial assign.

has_trivial_constructor Class

Tests whether the type has trivial default constructor.

has_trivial_copy Class

Tests whether the type has trivial copy constructor.

has_trivial_destructor Class

Tests whether the type has trivial destructor.

has_virtual_destructor Class

Tests whether the type has virtual destructor.

is_abstract Class

Tests whether the type is abstract class.

is_arithmetic Class

Tests whether the type is arithmetic.

is_array Class

Tests whether the type is array.

is_base_of Class

Tests whether one type is the base of another.

is_class Class

Tests whether the type is a class.

is_compound Class

Tests whether the type is not scalar.

is_const Class

Tests whether the type is const.

is_convertible Class

Tests whether one type is convertible to another.

is_empty Class

Tests whether the type is an empty class.

is_enum Class

Tests whether the type is an enumeration.

is_floating_point Class

Tests whether the type is floating-point.

is_function Class

Tests whether the type is a function type.

is_fundamental Class

Tests whether the type is void or arithmetic.

is_integral Class

Tests whether the type is integral.

is_member_function_pointer Class

Tests whether the type is a pointer to a member function.

is_member_object_pointer Class

Tests whether the type is a pointer to a member object.

is_member_pointer Class

Tests whether the type is a pointer to a member.

is_object Class

Tests whether the type is an object type.

is_pod Class

Tests whether the type is a POD.

is_pointer Class

Tests whether the type is a pointer.

is_polymorphic Class

Tests whether the type has a virtual function.

is_reference Class

Tests whether the type is a reference.

is_same Class

Tests whether two types are the same.

is_scalar Class

Tests whether the type is scalar.

is_signed Class

Tests whether the type is a signed integer.

is_union Class

Tests whether the type is a union.

is_unsigned Class

Tests whether the type is an unsigned integer.

is_void Class

Tests whether the type is void.

is_volatile Class

Tests whether the type is volatile.

rank Class

Gets the number of array dimensions.

remove_all_extents Class

Makes non-array type from array type.

remove_const Class

Makes non-const type from type.

remove_cv Class

Makes non-const/volatile type from type.

remove_extent Class

Makes element type from array type.

remove_pointer Class

Makes type from a pointer to type.

remove_reference Class

Makes non-reference type from type.

remove_volatile Class

Makes non-volatile type from type.

integral_constant Class

Makes integral constant from type and value.

Type

Description

false_type Typedef

Holds integral constant with false value.

true_type Typedef

Holds integral constant with true value.

Community Additions

ADD
Show:
© 2014 Microsoft