libstdc++
Metaprogramming
Collaboration diagram for Metaprogramming:

Classes

struct  std::__is_member_object_pointer_helper< typename >
 
struct  std::tr2::__reflection_typelist< _Elements >
 
struct  std::tr2::__reflection_typelist< _First, _Rest... >
 
struct  std::tr2::__reflection_typelist<>
 
struct  std::__remove_pointer_helper< _Tp, typename >
 
struct  std::add_const< _Tp >
 
struct  std::add_cv< _Tp >
 
struct  std::add_lvalue_reference< _Tp >
 
struct  std::add_pointer< _Tp >
 
struct  std::add_rvalue_reference< _Tp >
 
struct  std::add_volatile< _Tp >
 
struct  std::aligned_storage< _Len, _Align >
 
struct  std::aligned_union< _Len, _Types >
 
struct  std::alignment_of< _Tp >
 
struct  std::tr2::bases< _Tp >
 
struct  std::common_type< _Tp >
 
struct  std::conditional< _Cond, _Iftrue, _Iffalse >
 
struct  std::decay< _Tp >
 
struct  std::tr2::direct_bases< _Tp >
 
struct  std::enable_if< bool, _Tp >
 
struct  std::extent< typename, _Uint >
 
struct  std::has_virtual_destructor< _Tp >
 
struct  std::integral_constant< _Tp, __v >
 
struct  std::is_abstract< _Tp >
 
struct  std::is_arithmetic< _Tp >
 
struct  std::is_array< typename >
 
struct  std::is_assignable< _Tp, _Up >
 
struct  std::is_base_of< _Base, _Derived >
 
struct  std::is_class< _Tp >
 
struct  std::is_compound< _Tp >
 
struct  std::is_const< typename >
 
struct  std::is_constructible< _Tp, _Args >
 
struct  std::is_convertible< _From, _To >
 
struct  std::is_copy_assignable< _Tp >
 
struct  std::is_copy_constructible< _Tp >
 
struct  std::is_default_constructible< _Tp >
 
struct  std::is_destructible< _Tp >
 
struct  std::is_empty< _Tp >
 
struct  std::is_enum< _Tp >
 
struct  std::is_floating_point< _Tp >
 
struct  std::is_function< _Tp >
 
struct  std::is_fundamental< _Tp >
 
struct  std::is_integral< _Tp >
 
struct  std::is_layout_compatible< _Tp, _Up >
 
struct  std::is_literal_type< _Tp >
 
struct  std::is_lvalue_reference< typename >
 
struct  std::is_member_function_pointer< _Tp >
 
struct  std::is_member_pointer< _Tp >
 
struct  std::is_move_assignable< _Tp >
 
struct  std::is_move_constructible< _Tp >
 
struct  std::is_nothrow_assignable< _Tp, _Up >
 
struct  std::is_nothrow_constructible< _Tp, _Args >
 
struct  std::is_nothrow_copy_assignable< _Tp >
 
struct  std::is_nothrow_copy_constructible< _Tp >
 
struct  std::is_nothrow_default_constructible< _Tp >
 
struct  std::is_nothrow_destructible< _Tp >
 
struct  std::is_nothrow_move_assignable< _Tp >
 
struct  std::is_nothrow_move_constructible< _Tp >
 
struct  std::is_object< _Tp >
 
struct  std::is_pod< _Tp >
 
struct  std::is_pointer< _Tp >
 
struct  std::is_pointer_interconvertible_base_of< _Base, _Derived >
 
struct  std::is_polymorphic< _Tp >
 
struct  std::is_reference< _Tp >
 
struct  std::is_rvalue_reference< typename >
 
struct  std::is_same< _Tp, _Up >
 
struct  std::is_scalar< _Tp >
 
struct  std::is_signed< _Tp >
 
struct  std::is_standard_layout< _Tp >
 
struct  std::is_trivial< _Tp >
 
struct  std::is_trivially_assignable< _Tp, _Up >
 
struct  std::is_trivially_constructible< _Tp, _Args >
 
struct  std::is_trivially_copy_assignable< _Tp >
 
struct  std::is_trivially_copy_constructible< _Tp >
 
struct  std::is_trivially_copyable< _Tp >
 
struct  std::is_trivially_default_constructible< _Tp >
 
struct  std::is_trivially_destructible< _Tp >
 
struct  std::is_trivially_move_assignable< _Tp >
 
struct  std::is_trivially_move_constructible< _Tp >
 
struct  std::is_union< _Tp >
 
struct  std::is_unsigned< _Tp >
 
struct  std::is_void< _Tp >
 
struct  std::is_volatile< typename >
 
struct  std::make_signed< _Tp >
 
struct  std::make_unsigned< _Tp >
 
struct  std::rank< typename >
 
struct  std::remove_all_extents< _Tp >
 
struct  std::remove_const< _Tp >
 
struct  std::remove_cv< _Tp >
 
struct  std::remove_extent< _Tp >
 
struct  std::remove_reference< _Tp >
 
struct  std::remove_volatile< _Tp >
 
struct  std::result_of< _Signature >
 
struct  std::underlying_type< _Tp >
 

Typedefs

template<bool _Cond, typename _If , typename _Else >
using std::__conditional_t
 
template<bool _Cond, typename _Tp = void>
using std::__enable_if_t
 
template<typename _ToElementType , typename _FromElementType >
using std::__is_array_convertible
 
template<typename _Tp >
using std::add_lvalue_reference_t
 
template<typename _Tp >
using std::add_pointer_t
 
template<typename _Tp >
using std::add_rvalue_reference_t
 
template<size_t _Len, size_t _Align = __alignof__(typename __aligned_storage_msa<_Len>::__type)>
using std::aligned_storage_t
 
template<size_t _Len, typename... _Types>
using std::aligned_union_t
 
template<typename... _Tp>
using std::common_type_t
 
template<bool _Cond, typename _Iftrue , typename _Iffalse >
using std::conditional_t
 
template<typename _Tp >
using std::decay_t
 
template<bool _Cond, typename _Tp = void>
using std::enable_if_t
 
using std::false_type
 
template<typename _Tp >
using std::make_signed_t
 
template<typename _Tp >
using std::make_unsigned_t
 
template<typename _Tp >
using std::remove_all_extents_t
 
template<typename _Tp >
using std::remove_extent_t
 
template<typename _Tp >
using std::remove_pointer_t
 
template<typename _Tp >
using std::remove_reference_t
 
template<typename _Tp >
using std::result_of_t
 
using std::true_type
 
using std::integral_constant< _Tp, __v >::type
 
using std::enable_if< true, _Tp >::type
 
template<typename _Tp , typename >
using std::__conditional< bool >::type
 
template<typename , typename _Up >
using std::__conditional< false >::type
 
using std::__is_implicitly_default_constructible_impl< _Tp >::type
 
using std::__is_convertible_helper< _From, _To, bool >::type
 
using std::__is_convertible_helper< _From, _To, false >::type
 
using std::remove_const< _Tp >::type
 
using std::remove_const< _Tp const >::type
 
using std::remove_volatile< _Tp >::type
 
using std::remove_volatile< _Tp volatile >::type
 
using std::remove_cv< _Tp >::type
 
using std::remove_cv< const _Tp >::type
 
using std::remove_cv< volatile _Tp >::type
 
using std::remove_cv< const volatile _Tp >::type
 
using std::add_const< _Tp >::type
 
using std::add_volatile< _Tp >::type
 
using std::add_cv< _Tp >::type
 
using std::remove_reference< _Tp >::type
 
using std::remove_reference< _Tp & >::type
 
using std::remove_reference< _Tp && >::type
 
using std::add_lvalue_reference< _Tp >::type
 
using std::add_rvalue_reference< _Tp >::type
 
using std::make_unsigned< _Tp >::type
 
using std::make_signed< _Tp >::type
 
using std::remove_extent< _Tp >::type
 
using std::remove_extent< _Tp[_Size]>::type
 
using std::remove_extent< _Tp[]>::type
 
using std::remove_all_extents< _Tp >::type
 
using std::remove_all_extents< _Tp[_Size]>::type
 
using std::remove_all_extents< _Tp[]>::type
 
using std::__remove_pointer_helper< _Tp, typename >::type
 
using std::__remove_pointer_helper< _Tp, _Up * >::type
 
using std::__add_pointer_helper< _Tp, typename >::type
 
using std::__add_pointer_helper< _Tp, __void_t< _Tp * > >::type
 
using std::add_pointer< _Tp & >::type
 
using std::add_pointer< _Tp && >::type
 
using std::aligned_union< _Len, _Types >::type
 
using std::decay< _Tp >::type
 
using std::decay< _Tp & >::type
 
using std::decay< _Tp && >::type
 
using std::conditional< _Cond, _Iftrue, _Iffalse >::type
 
using std::conditional< false, _Iftrue, _Iffalse >::type
 
using std::common_reference< _Tp0 >::type
 
template<typename _Tp >
using std::underlying_type_t
 
using std::integral_constant< _Tp, __v >::value_type
 

Functions

template<typename _Tp >
static void std::__do_is_implicitly_default_constructible_impl::__helper (const _Tp &)
 
static false_type std::__do_is_implicitly_default_constructible_impl::__test (...)
 
template<typename _Tp >
static true_type std::__do_is_implicitly_default_constructible_impl::__test (const _Tp &, decltype(__helper< const _Tp & >({})) *=0)
 
constexpr std::integral_constant< _Tp, __v >::operator value_type () const noexcept
 
template<typename _Tp >
constexpr _Require< __not_< __is_tuple_like< _Tp > >, is_move_constructible< _Tp >, is_move_assignable< _Tp > > std::swap (_Tp &, _Tp &) noexcept(__and_< is_nothrow_move_constructible< _Tp >, is_nothrow_move_assignable< _Tp > >::value)
 
template<typename _Tp , size_t _Nm>
constexpr __enable_if_t< __is_swappable< _Tp >::value > std::swap (_Tp(&__a)[_Nm], _Tp(&__b)[_Nm]) noexcept(__is_nothrow_swappable< _Tp >::value)
 

Variables

struct { 
 
std::__aligned_storage_msa< _Len >::__type::__align 
 
struct { 
 
std::aligned_storage< _Len, _Align >::type::__align 
 
unsigned char std::__aligned_storage_msa< _Len >::__type::__data [_Len]
 
unsigned char std::aligned_storage< _Len, _Align >::type::__data [_Len]
 
static const size_t std::__strictest_alignment< _Types >::_S_alignment
 
static const size_t std::__strictest_alignment< _Tp, _Types... >::_S_alignment
 
static const size_t std::__strictest_alignment< _Types >::_S_size
 
static const size_t std::__strictest_alignment< _Tp, _Types... >::_S_size
 
static const size_t std::aligned_union< _Len, _Types >::alignment_value
 
static constexpr _Tp std::integral_constant< _Tp, __v >::value
 
template<typename... _Tp>
using std::common_reference_t
 
template<typename _Tp , typename _Up >
constexpr bool std::is_layout_compatible_v
 
template<typename _Base , typename _Derived >
constexpr bool std::is_pointer_interconvertible_base_of_v
 
template<typename _S1 , typename _S2 , typename _M1 , typename _M2 >
constexpr bool std::is_corresponding_member (_M1 _S1::*__m1, _M2 _S2::*__m2) noexcept
 
template<typename _Tp , typename _Mem >
constexpr bool std::is_pointer_interconvertible_with_class (_Mem _Tp::*__mp) noexcept
 

Detailed Description

Template utilities for compile-time introspection and modification, including type classification traits, type property inspection traits and type transformation traits.

Since
C++11

Typedef Documentation

◆ __conditional_t

template<bool _Cond, typename _If , typename _Else >
using std::__conditional_t

Definition at line 156 of file type_traits.

◆ __enable_if_t

template<bool _Cond, typename _Tp = void>
using std::__enable_if_t

Definition at line 138 of file type_traits.

◆ __is_array_convertible

◆ add_lvalue_reference_t

Alias template for add_lvalue_reference.

Definition at line 1719 of file type_traits.

◆ add_pointer_t

Alias template for add_pointer.

Definition at line 2150 of file type_traits.

◆ add_rvalue_reference_t

Alias template for add_rvalue_reference.

Definition at line 1723 of file type_traits.

◆ aligned_storage_t

template<size_t _Len, size_t _Align = __alignof__(typename __aligned_storage_msa<_Len>::__type)>
using std::aligned_storage_t

Alias template for aligned_storage.

Definition at line 2677 of file type_traits.

◆ aligned_union_t

template<size_t _Len, typename... _Types>
using std::aligned_union_t

Definition at line 2680 of file type_traits.

◆ common_reference_t

template<typename... _Tp>
using std::common_reference_t
Since
C++20

Definition at line 3907 of file type_traits.

◆ common_type_t

template<typename... _Tp>
using std::common_type_t

Alias template for common_type.

Definition at line 2697 of file type_traits.

◆ conditional_t

Alias template for conditional.

Definition at line 2693 of file type_traits.

◆ decay_t

template<typename _Tp >
using std::decay_t

Alias template for decay.

Definition at line 2685 of file type_traits.

◆ enable_if_t

template<bool _Cond, typename _Tp = void>
using std::enable_if_t

Alias template for enable_if.

Definition at line 2689 of file type_traits.

◆ false_type

The type used as a compile-time boolean with false value.

Definition at line 114 of file type_traits.

◆ make_signed_t

Alias template for make_signed.

Definition at line 2054 of file type_traits.

◆ make_unsigned_t

Alias template for make_unsigned.

Definition at line 2058 of file type_traits.

◆ remove_all_extents_t

Alias template for remove_all_extents.

Definition at line 2096 of file type_traits.

◆ remove_extent_t

Alias template for remove_extent.

Definition at line 2092 of file type_traits.

◆ remove_pointer_t

Alias template for remove_pointer.

Definition at line 2146 of file type_traits.

◆ remove_reference_t

Alias template for remove_reference.

Definition at line 1715 of file type_traits.

◆ result_of_t

Alias template for result_of.

Definition at line 2705 of file type_traits.

◆ true_type

The type used as a compile-time boolean with true value.

Definition at line 111 of file type_traits.

◆ type [1/44]

template<typename _Tp , _Tp __v>
using std::integral_constant< _Tp, __v >::type

Definition at line 91 of file type_traits.

◆ type [2/44]

template<typename _Tp >
using std::enable_if< true, _Tp >::type

Definition at line 134 of file type_traits.

◆ type [3/44]

template<bool >
template<typename _Tp , typename >
using std::__conditional< bool >::type

Definition at line 144 of file type_traits.

◆ type [4/44]

template<typename , typename _Up >
using std::__conditional< false >::type

Definition at line 151 of file type_traits.

◆ type [5/44]

template<typename _Tp >
using std::__is_implicitly_default_constructible_impl< _Tp >::type

Definition at line 1334 of file type_traits.

◆ type [6/44]

template<typename _From , typename _To , bool = __or_<is_void<_From>, is_function<_To>, is_array<_To>>::value>
using std::__is_convertible_helper< _From, _To, bool >::type

Definition at line 1505 of file type_traits.

◆ type [7/44]

template<typename _From , typename _To >
using std::__is_convertible_helper< _From, _To, false >::type

Definition at line 1526 of file type_traits.

◆ type [8/44]

template<typename _Tp >
using std::remove_const< _Tp >::type

Definition at line 1602 of file type_traits.

◆ type [9/44]

template<typename _Tp >
using std::remove_const< _Tp const >::type

Definition at line 1606 of file type_traits.

◆ type [10/44]

template<typename _Tp >
using std::remove_volatile< _Tp >::type

Definition at line 1611 of file type_traits.

◆ type [11/44]

template<typename _Tp >
using std::remove_volatile< _Tp volatile >::type

Definition at line 1615 of file type_traits.

◆ type [12/44]

template<typename _Tp >
using std::remove_cv< _Tp >::type

Definition at line 1625 of file type_traits.

◆ type [13/44]

template<typename _Tp >
using std::remove_cv< const _Tp >::type

Definition at line 1629 of file type_traits.

◆ type [14/44]

template<typename _Tp >
using std::remove_cv< volatile _Tp >::type

Definition at line 1633 of file type_traits.

◆ type [15/44]

template<typename _Tp >
using std::remove_cv< const volatile _Tp >::type

Definition at line 1637 of file type_traits.

◆ type [16/44]

template<typename _Tp >
using std::add_const< _Tp >::type

Definition at line 1643 of file type_traits.

◆ type [17/44]

template<typename _Tp >
using std::add_volatile< _Tp >::type

Definition at line 1648 of file type_traits.

◆ type [18/44]

template<typename _Tp >
using std::add_cv< _Tp >::type

Definition at line 1653 of file type_traits.

◆ type [19/44]

template<typename _Tp >
using std::remove_reference< _Tp >::type

Definition at line 1691 of file type_traits.

◆ type [20/44]

template<typename _Tp >
using std::remove_reference< _Tp & >::type

Definition at line 1695 of file type_traits.

◆ type [21/44]

template<typename _Tp >
using std::remove_reference< _Tp && >::type

Definition at line 1699 of file type_traits.

◆ type [22/44]

template<typename _Tp >
using std::add_lvalue_reference< _Tp >::type

Definition at line 1705 of file type_traits.

◆ type [23/44]

template<typename _Tp >
using std::add_rvalue_reference< _Tp >::type

Definition at line 1710 of file type_traits.

◆ type [24/44]

template<typename _Tp >
using std::make_unsigned< _Tp >::type

Definition at line 1911 of file type_traits.

◆ type [25/44]

template<typename _Tp >
using std::make_signed< _Tp >::type

Definition at line 2043 of file type_traits.

◆ type [26/44]

template<typename _Tp >
using std::remove_extent< _Tp >::type

Definition at line 2066 of file type_traits.

◆ type [27/44]

template<typename _Tp , std::size_t _Size>
using std::remove_extent< _Tp[_Size]>::type

Definition at line 2070 of file type_traits.

◆ type [28/44]

template<typename _Tp >
using std::remove_extent< _Tp[]>::type

Definition at line 2074 of file type_traits.

◆ type [29/44]

template<typename _Tp >
using std::remove_all_extents< _Tp >::type

Definition at line 2079 of file type_traits.

◆ type [30/44]

template<typename _Tp , std::size_t _Size>
using std::remove_all_extents< _Tp[_Size]>::type

Definition at line 2083 of file type_traits.

◆ type [31/44]

template<typename _Tp >
using std::remove_all_extents< _Tp[]>::type

Definition at line 2087 of file type_traits.

◆ type [32/44]

Definition at line 2109 of file type_traits.

◆ type [33/44]

template<typename _Tp , typename _Up >
using std::__remove_pointer_helper< _Tp, _Up * >::type

Definition at line 2113 of file type_traits.

◆ type [34/44]

template<typename _Tp , typename = void>
using std::__add_pointer_helper< _Tp, typename >::type

Definition at line 2123 of file type_traits.

◆ type [35/44]

template<typename _Tp >
using std::__add_pointer_helper< _Tp, __void_t< _Tp * > >::type

Definition at line 2127 of file type_traits.

◆ type [36/44]

template<typename _Tp >
using std::add_pointer< _Tp & >::type

Definition at line 2137 of file type_traits.

◆ type [37/44]

template<typename _Tp >
using std::add_pointer< _Tp && >::type

Definition at line 2141 of file type_traits.

◆ type [38/44]

template<size_t _Len, typename... _Types>
using std::aligned_union< _Len, _Types >::type

The storage.

Definition at line 2237 of file type_traits.

◆ type [39/44]

template<typename _Tp >
using std::decay< _Tp >::type

Definition at line 2268 of file type_traits.

◆ type [40/44]

template<typename _Tp >
using std::decay< _Tp & >::type

Definition at line 2272 of file type_traits.

◆ type [41/44]

template<typename _Tp >
using std::decay< _Tp && >::type

Definition at line 2276 of file type_traits.

◆ type [42/44]

template<bool _Cond, typename _Iftrue , typename _Iffalse >
using std::conditional< _Cond, _Iftrue, _Iffalse >::type

Definition at line 2317 of file type_traits.

◆ type [43/44]

Definition at line 2322 of file type_traits.

◆ type [44/44]

template<typename _Tp0 >
using std::common_reference< _Tp0 >::type

Definition at line 3917 of file type_traits.

◆ underlying_type_t

Alias template for underlying_type.

Definition at line 2701 of file type_traits.

◆ value_type

template<typename _Tp , _Tp __v>
using std::integral_constant< _Tp, __v >::value_type

Definition at line 90 of file type_traits.

Function Documentation

◆ is_corresponding_member()

constexpr bool std::is_corresponding_member ( _M1 _S1::* __m1,
_M2 _S2::* __m2 )
constexprnoexcept
Since
C++20

Definition at line 3697 of file type_traits.

◆ is_pointer_interconvertible_with_class()

template<typename _Tp , typename _Mem >
constexpr bool std::is_pointer_interconvertible_with_class ( _Mem _Tp::* __mp)
constexprnoexcept

True if __mp points to the first member of a standard-layout type.

Returns
true if s.*__mp is pointer-interconvertible with s
Since
C++20

Definition at line 3727 of file type_traits.

◆ operator value_type()

template<typename _Tp , _Tp __v>
constexpr std::integral_constant< _Tp, __v >::operator value_type ( ) const
inlineconstexprnoexcept

Definition at line 92 of file type_traits.

◆ swap() [1/2]

template<typename _Tp >
constexpr _Require< __not_< __is_tuple_like< _Tp > >, is_move_constructible< _Tp >, is_move_assignable< _Tp > > std::swap ( _Tp & __a,
_Tp & __b )
inlineconstexprnoexcept

Swaps two values.

Parameters
__aA thing of arbitrary type.
__bAnother thing of arbitrary type.
Returns
Nothing.

Definition at line 213 of file move.h.

◆ swap() [2/2]

template<typename _Tp , size_t _Nm>
constexpr __enable_if_t< __is_swappable< _Tp >::value > std::swap ( _Tp(&) __a[_Nm],
_Tp(&) __b[_Nm] )
inlineconstexprnoexcept

Swap the contents of two arrays.

Definition at line 237 of file move.h.

Variable Documentation

◆ __data [1/2]

template<std::size_t _Len>
unsigned char std::__aligned_storage_msa< _Len >::__type::__data[_Len]

Definition at line 2158 of file type_traits.

◆ __data [2/2]

template<std::size_t _Len, std::size_t _Align = __alignof__(typename __aligned_storage_msa<_Len>::__type)>
unsigned char std::aligned_storage< _Len, _Align >::type::__data[_Len]

Definition at line 2184 of file type_traits.

◆ _S_alignment [1/2]

template<typename... _Types>
const size_t std::__strictest_alignment< _Types >::_S_alignment
static

Definition at line 2192 of file type_traits.

◆ _S_alignment [2/2]

template<typename _Tp , typename... _Types>
const size_t std::__strictest_alignment< _Tp, _Types... >::_S_alignment
static

Definition at line 2199 of file type_traits.

◆ _S_size [1/2]

template<typename... _Types>
const size_t std::__strictest_alignment< _Types >::_S_size
static

Definition at line 2193 of file type_traits.

◆ _S_size [2/2]

template<typename _Tp , typename... _Types>
const size_t std::__strictest_alignment< _Tp, _Types... >::_S_size
static

Definition at line 2202 of file type_traits.

◆ alignment_value

template<size_t _Len, typename... _Types>
const size_t std::aligned_union< _Len, _Types >::alignment_value
static

The value of the strictest alignment of _Types.

Definition at line 2235 of file type_traits.

◆ is_layout_compatible_v

template<typename _Tp , typename _Up >
constexpr bool std::is_layout_compatible_v
constexpr
Since
C++20

Definition at line 3686 of file type_traits.

◆ is_pointer_interconvertible_base_of_v

template<typename _Base , typename _Derived >
constexpr bool std::is_pointer_interconvertible_base_of_v
constexpr
Since
C++20

Definition at line 3714 of file type_traits.

◆ value

template<typename _Tp , _Tp __v>
constexpr _Tp std::integral_constant< _Tp, __v >::value
staticconstexpr

Definition at line 89 of file type_traits.