[ Web Proxy ]
URL:
Viewing: https://ko.cppreference.com/cpp/types#Type_traits [Back]  [Original]

Type support (basic types, RTTI, type traits) - cppreference.com
cppreference.com

Type support (basic types, RTTI, type traits)

cppreference.com
< cpp
 
 
 
Type support
Basic types
Fundamental types
Fixed width integer types (C++11)
Numeric limits
C numeric limits interface
Runtime type information
Type traits
Primary type categories
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
Type properties
(C++11)
(C++11)
(C++11)
Supported operations
Relationships and property queries
(C++11)
(C++11)
(C++11)
(C++11)
Type modifications
(C++11)(C++11)(C++11)
Type transformations
(C++11)
(C++11)
(C++11)
Type trait constants
 

Basic types

Fundamental types defined by the language

Additional basic types and macros

<cstddef> .
sizeof .
(typedef) [edit]

(typedef) [edit]
(C++11)
nullptr
(typedef) [edit]

(macro constant) [edit]
POD type with alignment requirement as great as any other scalar type
(typedef) [edit]
byte offset from the beginning of a standard-layout type to specified member
(function macro) [edit]
<cstdbool> .
__bool_true_false_are_defined
(C++11)
C compatibility macro constant, expands to integer constant 1
(macro constant)
<cstdalign> .
__alignas_is_defined
(C++11)
C compatibility macro constant, expands to integer constant 1
(macro constant)

Fixed width integer types (since C++11)

numeric_limits

<limits> .
.
(class template) [edit]

C numeric limits interface

Runtime type identification

contains some type's information, generated by the implementation.
This is the class, returned by the typeid operator
(class) [edit]
wrapper around a type_info object, that can be used as index in associative and unordered associative containers
(class) [edit]
typeid .
(class) [edit]
dynamic_cast . , .
(class) [edit]

Type traits (since C++11)

Type traits defines an compile-time template-based interface to query or modify the properties of types.

Type properties

<type_traits> .
Primary type categories
(C++11)
void
(class template) [edit]

(class template) [edit]

(class template) [edit]
(C++11)

(class template) [edit]
(C++11)

(class template) [edit]
(C++11)

(class template) [edit]
(C++11)

(class template) [edit]

(class template) [edit]

(class template) [edit]

(class template) [edit]

(class template) [edit]

(class template) [edit]

(class template) [edit]
Composite type categories

(class template) [edit]
checks if a type is arithmetic type
(class template) [edit]
(C++11)
checks if a type is scalar type
(class template) [edit]
(C++11)
checks if a type is object type
(class template) [edit]
checks if a type is compound type
(class template) [edit]
checks if a type is either lvalue reference or rvalue reference
(class template) [edit]
checks if a type is a pointer to a non-static member function or object
(class template) [edit]
Type properties
(C++11)
checks if a type is const-qualified
(class template) [edit]
checks if a type is volatile-qualified
(class template) [edit]
checks if a type is trivial
(class template) [edit]
checks if a type is trivially copyable
(class template) [edit]
checks if a type is standard-layout type
(class template) [edit]
(C++11)
checks if a type is plain-old data (POD) type
(class template) [edit]
checks if a type is literal type
(class template) [edit]
(C++11)
checks if a type is class (but not union) type and has no data
(class template) [edit]
checks if a type is polymorphic class type
(class template) [edit]
checks if a type is abstract class type
(class template) [edit]
(C++11)
checks if a type is signed arithmetic type
(class template) [edit]
checks if a type is unsigned arithmetic type
(class template) [edit]
Supported operations
checks if a type has a constructor for specific arguments
(class template) [edit]
checks if a type has a default constructor
(class template) [edit]
checks if a type has a copy constructor
(class template) [edit]
checks if a type has a move constructor
(class template) [edit]
checks if a type has a assignment operator for a specific argument
(class template) [edit]
checks if a type has a copy assignment operator
(class template) [edit]
checks if a type has a move assignment operator
(class template) [edit]
checks if a type has a non-deleted destructor
(class template) [edit]
checks if a type has a virtual destructor
(class template) [edit]
Property queries
obtains the type's alignment requirements
(class template) [edit]
(C++11)
obtains the number of dimensions of an array type
(class template) [edit]
(C++11)
obtains the size of an array type along a specified dimension
(class template) [edit]
Type relationships
(C++11)
checks if two types are the same
(class template) [edit]
checks if a type is derived from the other type
(class template) [edit]
checks if a type can be converted to the other type
(class template) [edit]

Type modifications

Type modification templates create new type definitions by applying modifications on a template parameter. The resulting type can then be accessed through type member typedef.

<type_traits> .
Const-volatility specifiers
removes const or/and volatile specifiers from the given type
(class template) [edit]
(C++11)
(C++11)
(C++11)
adds const or/and volatile specifiers to the given type
(class template) [edit]
References
removes reference from the given type
(class template) [edit]
adds lvalue or rvalue reference to the given type
(class template) [edit]
Pointers
removes pointer from the given type
(class template) [edit]
adds pointer to the given type
(class template) [edit]
Sign modifiers
makes the given integral type signed
(class template) [edit]
makes the given integral type unsigned
(class template) [edit]
Arrays
removes one extent from the given array type
(class template) [edit]
removes all extents from the given array type
(class template) [edit]

Miscellaneous transformations

<type_traits> .
defines the type suitable for use as uninitialized storage for types of given size
(class template) [edit]
defines the type suitable for use as uninitialized storage for all given types
(class template) [edit]
(C++11)
applies type transformations as when passing a function argument by value
(class template) [edit]
(C++11)
hides a function overload or template specialization based on compile-time boolean
(class template) [edit]
chooses one type or another based on compile-type boolean
(class template) [edit]
deduces the result type of a mixed-mode arithmetic expression
(class template) [edit]
obtains the underlying integer type for a given enumeration type
(class template) [edit]
(C++11)
deduces the return type of a function call expression
(class template) [edit]

Helper classes

<type_traits> .
compile-time constant of specified type with specified value
(class template) [edit]

Two specializations of std::integral_constant for the type bool are provided:

<type_traits> .
Type Definition
true_type std::integral_constant<bool, true>
false_type std::integral_constant<bool, false>

Web Proxy Viewer  |  New URL  |  Original Page