CARVIEW |
Select Language
HTTP/1.1 200 OK
Server: nginx
Date: Mon, 21 Jul 2025 19:05:28 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
ETag: W/"f858-PegZ6hXldao6lY7g0X5wfBDGZYg"
Content-Encoding: gzip
This header defines a series of classes to obtain type information on compile-time.
The header contains:
A basic trait for types is the categories in which they can be classified. This is a chart on how these categories overlap:
* = excluding unions
Reference
C library:
- <cassert> (assert.h)
- <cctype> (ctype.h)
- <cerrno> (errno.h)
-
<cfenv> (fenv.h)C++11
- <cfloat> (float.h)
-
<cinttypes> (inttypes.h)C++11
- <ciso646> (iso646.h)
- <climits> (limits.h)
- <clocale> (locale.h)
- <cmath> (math.h)
- <csetjmp> (setjmp.h)
- <csignal> (signal.h)
- <cstdarg> (stdarg.h)
-
<cstdbool> (stdbool.h)C++11
- <cstddef> (stddef.h)
-
<cstdint> (stdint.h)C++11
- <cstdio> (stdio.h)
- <cstdlib> (stdlib.h)
- <cstring> (string.h)
-
<ctgmath> (tgmath.h)C++11
- <ctime> (time.h)
-
<cuchar> (uchar.h)C++11
- <cwchar> (wchar.h)
- <cwctype> (wctype.h)
Containers:
-
<array>C++11
- <deque>
-
<forward_list>C++11
- <list>
- <map>
- <queue>
- <set>
- <stack>
-
<unordered_map>C++11
-
<unordered_set>C++11
- <vector>
-
Input/Output:
Multi-threading:
-
<atomic>C++11
-
<condition_variable>C++11
-
<future>C++11
-
<mutex>C++11
-
<thread>C++11
-
Other:
- <algorithm>
- <bitset>
-
<chrono>C++11
-
<codecvt>C++11
- <complex>
- <exception>
- <functional>
-
<initializer_list>C++11
- <iterator>
- <limits>
- <locale>
- <memory>
- <new>
- <numeric>
-
<random>C++11
-
<ratio>C++11
-
<regex>C++11
- <stdexcept>
- <string>
-
<system_error>C++11
-
<tuple>C++11
-
<type_traits>C++11
-
<typeindex>C++11
- <typeinfo>
- <utility>
- <valarray>
<type_traits>
helper classes
-
false_typeC++11
-
integral_constantC++11
-
true_typeC++11
-
type traits
-
alignment_ofC++11
-
extentC++11
-
has_virtual_destructorC++11
-
is_abstractC++11
-
is_arithmeticC++11
-
is_arrayC++11
-
is_assignableC++11
-
is_base_ofC++11
-
is_classC++11
-
is_compoundC++11
-
is_constC++11
-
is_constructibleC++11
-
is_convertibleC++11
-
is_copy_assignableC++11
-
is_copy_constructibleC++11
-
is_default_constructibleC++11
-
is_destructibleC++11
-
is_emptyC++11
-
is_enumC++11
-
is_floating_pointC++11
-
is_functionC++11
-
is_fundamentalC++11
-
is_integralC++11
-
is_literal_typeC++11
-
is_lvalue_referenceC++11
-
is_member_function_pointerC++11
-
is_member_object_pointerC++11
-
is_member_pointerC++11
-
is_move_assignableC++11
-
is_move_constructibleC++11
-
is_nothrow_assignableC++11
-
is_nothrow_constructibleC++11
-
is_nothrow_copy_assignableC++11
-
is_nothrow_copy_constructibleC++11
-
is_nothrow_default_constructibleC++11
-
is_nothrow_destructibleC++11
-
is_nothrow_move_assignableC++11
-
is_nothrow_move_constructibleC++11
-
is_null_pointerC++14
-
is_objectC++11
-
is_podC++11
-
is_pointerC++11
-
is_polymorphicC++11
-
is_referenceC++11
-
is_rvalue_referenceC++11
-
is_sameC++11
-
is_scalarC++11
-
is_signedC++11
-
is_standard_layoutC++11
-
is_trivialC++11
-
is_trivially_assignableC++11
-
is_trivially_constructibleC++11
-
is_trivially_copy_assignableC++11
-
is_trivially_copy_constructibleC++11
-
is_trivially_copyableC++11
-
is_trivially_default_constructibleC++11
-
is_trivially_destructibleC++11
-
is_trivially_move_assignableC++11
-
is_trivially_move_constructibleC++11
-
is_unionC++11
-
is_unsignedC++11
-
is_voidC++11
-
is_volatileC++11
-
rankC++11
-
type transformations
-
add_constC++11
-
add_cvC++11
-
add_lvalue_referenceC++11
-
add_pointerC++11
-
add_rvalue_referenceC++11
-
add_volatileC++11
-
aligned_storageC++11
-
aligned_unionC++11
-
common_typeC++11
-
conditionalC++11
-
decayC++11
-
enable_ifC++11
-
make_signedC++11
-
make_unsignedC++11
-
remove_all_extentsC++11
-
remove_constC++11
-
remove_cvC++11
-
remove_extentC++11
-
remove_pointerC++11
-
remove_referenceC++11
-
remove_volatileC++11
-
result_ofC++11
-
underlying_typeC++11
-
- Reference
- <type_traits>
header
<type_traits>
type_traits
The header contains:
- Helper classes: Standard classes to assist in creating compile-time constants.
- Type traits: Classes to obtain characteristics of types in the form of compile-time constant values.
- Type transformations: Classes to obtain new types by applying specific transformations to existing types.
A basic trait for types is the categories in which they can be classified. This is a chart on how these categories overlap:
primary categories | composite categories | |||
---|---|---|---|---|
fundamental | void | |||
std::nullptr_t | scalar | object | ||
integral | arithmetic | |||
floating point | ||||
compound | pointer | |||
member object pointer | member pointer | |||
member function pointer | ||||
enum | ||||
union | ||||
class* | ||||
array | ||||
l-value reference | reference | |||
r-value reference | ||||
function |
Helper classes
- integral_constant
- Integral constant (class template)
- true_type
- True type (class)
- false_type
- False type (class)
Type traits
Primary type categories
- is_array
- Is array (class template)
- is_class
- Is non-union class (class template)
- is_enum
- Is enum (class template)
- is_floating_point
- Is floating point (class template)
- is_function
- Is function (class template)
- is_integral
- Is integral (class template)
- is_lvalue_reference
- Is lvalue reference (class template)
- is_member_function_pointer
- Is member function pointer (class template)
- is_member_object_pointer
- Is member object pointer (class template)
- is_pointer
- Is pointer (class template)
- is_rvalue_reference
- Is rvalue reference (class template)
- is_union
- Is union (class template)
- is_void
- Is void (class template)
Composite type categories
- is_arithmetic
- Is arithmetic type (class template)
- is_compound
- Is compound type (class template)
- is_fundamental
- Is fundamental type (class template)
- is_member_pointer
- Is member pointer type (class template)
- is_object
- Is object type (class template)
- is_reference
- Is reference type (class template)
- is_scalar
- Is scalar type (class template)
Type properties
- is_abstract
- Is abstract class (class template)
- is_const
- Is const-qualified (class template)
- is_empty
- Is empty class (class template)
- is_literal_type
- Is literal type (class template)
- is_pod
- Is POD type (class template)
- is_polymorphic
- Is polymorphic (class template)
- is_signed
- Is signed type (class template)
- is_standard_layout
- Is standard-layout type (class template)
- is_trivial
- Is trivial type (class template)
- is_trivially_copyable
- Is trivially copyable (class template)
- is_unsigned
- Is unsigned type (class template)
- is_volatile
- Is volatile-qualified (class template)
Type features
- has_virtual_destructor
- Has virtual destructor (class template)
- is_assignable
- Is assignable (class template)
- is_constructible
- Is constructible (class template)
- is_copy_assignable
- Is copy assignable (class template)
- is_copy_constructible
- Is copy constructible (class template)
- is_destructible
- Is destructible (class template)
- is_default_constructible
- Is default constructible (class template)
- is_move_assignable
- Is move assignable (class template)
- is_move_constructible
- Is move constructible (class template)
- is_trivially_assignable
- Is trivially assignable (class template)
- is_trivially_constructible
- Is trivially constructible (class template)
- is_trivially_copy_assignable
- Is trivially copy assignable (class template)
- is_trivially_copy_constructible
- Is trivially copy constructible (class template)
- is_trivially_destructible
- Is trivially destructible (class template)
- is_trivially_default_constructible
- Is trivially default constructible (class template)
- is_trivially_move_assignable
- Is trivially move assignable (class template)
- is_trivially_move_constructible
- Is trivially move constructible (class template)
- is_nothrow_assignable
- Is assignable throwing no exceptions (class template)
- is_nothrow_constructible
- Is constructible throwing no exceptions (class template)
- is_nothrow_copy_assignable
- Is copy assignable throwing no exceptions (class template)
- is_nothrow_copy_constructible
- Is copy constructible throwing no exceptions (class template)
- is_nothrow_destructible
- Is nothrow destructible (class template)
- is_nothrow_default_constructible
- Is default constructible throwing no exceptions (class template)
- is_nothrow_move_assignable
- Is move assignable throwing no exception (class template)
- is_nothrow_move_constructible
- Is move constructible throwing no exceptions (class template)
Type relationships
- is_base_of
- Is base class of (class template)
- is_convertible
- Is convertible (class template)
- is_same
- Is same type (class template)
Property queries
- alignment_of
- Alignment of (class template)
- extent
- Array dimension extent (class template)
- rank
- Array rank (class template)
Type transformations
Const-volatile qualifications
- add_const
- Add const qualification (class template)
- add_cv
- Add const volatile qualification (class template)
- add_volatile
- Add volatile qualification (class template)
- remove_const
- Remove const qualification (class template)
- remove_cv
- Remove cv qualification (class template)
- remove_volatile
- Remove volatile qualification (class template)
Compound type alterations
- add_pointer
- Add pointer (class template)
- add_lvalue_reference
- Add lvalue reference (class template)
- add_rvalue_reference
- Add rvalue reference (class template)
- decay
- Decay type (class template)
- make_signed
- Make signed (class template)
- make_unsigned
- Make unsigned (class template)
- remove_all_extents
- Remove all array extents (class template)
- remove_extent
- Remove array extent (class template)
- remove_pointer
- Remove pointer (class template)
- remove_reference
- Remove reference (class template)
- underlying_type
- Underlying type of enum (class template)
Other type generators
- aligned_storage
- Aligned storage (class template)
- aligned_union
- Aligned union (class template)
- common_type
- Common type (class template)
- conditional
- Conditional type (class template)
- enable_if
- Enable type if condition is met (class template)
- result_of
- Result of call (class template)
Home page | Privacy policy
© cplusplus.com, 2000-2025 - All rights reserved - v3.3.4s
Spotted an error? contact us
© cplusplus.com, 2000-2025 - All rights reserved - v3.3.4s
Spotted an error? contact us