libstdc++: Metaprogramming (original) (raw)
Typedefs | |
---|---|
template<bool _Cond, typename _If , typename _Else > | |
using | std::__conditional_t = typename __conditional< _Cond >::template type< _If, _Else > |
template<bool _Cond, typename _Tp = void> | |
using | std::__enable_if_t = typename enable_if< _Cond, _Tp >::type |
template<typename _ToElementType , typename _FromElementType > | |
using | std::__is_array_convertible = is_convertible< _FromElementType(*)[], _ToElementType(*)[]> |
template<typename _Tp > | |
using | std::add_lvalue_reference_t = typename add_lvalue_reference< _Tp >::type |
template<typename _Tp > | |
using | std::add_pointer_t = typename add_pointer< _Tp >::type |
template<typename _Tp > | |
using | std::add_rvalue_reference_t = typename add_rvalue_reference< _Tp >::type |
template<size_t _Len, size_t _Align = __alignof__(typename __aligned_storage_msa<_Len>::__type)> | |
using | std::aligned_storage_t = typename aligned_storage< _Len, _Align >::type |
template<size_t _Len, typename... _Types> | |
using | std::aligned_union_t = typename aligned_union< _Len, _Types... >::type |
template<typename... _Tp> | |
using | std::common_type_t = typename common_type< _Tp... >::type |
template<bool _Cond, typename _Iftrue , typename _Iffalse > | |
using | std::conditional_t = typename conditional< _Cond, _Iftrue, _Iffalse >::type |
template<typename _Tp > | |
using | std::decay_t = typename decay< _Tp >::type |
template<bool _Cond, typename _Tp = void> | |
using | std::enable_if_t = typename enable_if< _Cond, _Tp >::type |
using | std::false_type = __bool_constant< false > |
template<typename _Tp > | |
using | std::make_signed_t = typename make_signed< _Tp >::type |
template<typename _Tp > | |
using | std::make_unsigned_t = typename make_unsigned< _Tp >::type |
template<typename _Tp > | |
using | std::remove_all_extents_t = typename remove_all_extents< _Tp >::type |
template<typename _Tp > | |
using | std::remove_extent_t = typename remove_extent< _Tp >::type |
template<typename _Tp > | |
using | std::remove_pointer_t = typename remove_pointer< _Tp >::type |
template<typename _Tp > | |
using | std::remove_reference_t = typename remove_reference< _Tp >::type |
template<typename _Tp > | |
using | std::result_of_t = typename result_of< _Tp >::type |
using | std::true_type = __bool_constant< true > |
using | std::integral_constant< _Tp, __v >::type = integral_constant< _Tp, __v > |
using | std::enable_if< true, _Tp >::type = _Tp |
template<typename _Tp , typename > | |
using | std::__conditional< bool >::type = _Tp |
template<typename , typename _Up > | |
using | std::__conditional< false >::type = _Up |
using | std::__is_implicitly_default_constructible_impl< _Tp >::type = decltype(__test(declval< _Tp >())) |
using | std::__is_convertible_helper< _From, _To, bool >::type = typename is_void< _To >::type |
using | std::__is_convertible_helper< _From, _To, false >::type = decltype(__test< _From, _To >(0)) |
using | std::remove_const< _Tp >::type = _Tp |
using | std::remove_const< _Tp const >::type = _Tp |
using | std::remove_volatile< _Tp >::type = _Tp |
using | std::remove_volatile< _Tp volatile >::type = _Tp |
using | std::remove_cv< _Tp >::type = _Tp |
using | std::remove_cv< const _Tp >::type = _Tp |
using | std::remove_cv< volatile _Tp >::type = _Tp |
using | std::remove_cv< const volatile _Tp >::type = _Tp |
using | std::add_const< _Tp >::type = _Tp const |
using | std::add_volatile< _Tp >::type = _Tp volatile |
using | std::add_cv< _Tp >::type = _Tp const volatile |
using | std::remove_reference< _Tp >::type = _Tp |
using | std::remove_reference< _Tp & >::type = _Tp |
using | std::remove_reference< _Tp && >::type = _Tp |
using | std::add_lvalue_reference< _Tp >::type = __add_lval_ref_t< _Tp > |
using | std::add_rvalue_reference< _Tp >::type = __add_rval_ref_t< _Tp > |
using | std::make_unsigned< _Tp >::type = typename __make_unsigned_selector< _Tp >::__type |
using | std::make_signed< _Tp >::type = typename __make_signed_selector< _Tp >::__type |
using | std::remove_extent< _Tp >::type = _Tp |
using | std::remove_extent< _Tp[_Size]>::type = _Tp |
using | std::remove_extent< _Tp[]>::type = _Tp |
using | std::remove_all_extents< _Tp >::type = _Tp |
using | std::remove_all_extents< _Tp[_Size]>::type = typename remove_all_extents< _Tp >::type |
using | std::remove_all_extents< _Tp[]>::type = typename remove_all_extents< _Tp >::type |
using | std::__remove_pointer_helper< _Tp, typename >::type = _Tp |
using | std::__remove_pointer_helper< _Tp, _Up * >::type = _Up |
using | std::__add_pointer_helper< _Tp, typename >::type = _Tp |
using | std::__add_pointer_helper< _Tp, __void_t< _Tp * > >::type = _Tp * |
using | std::add_pointer< _Tp & >::type = _Tp * |
using | std::add_pointer< _Tp && >::type = _Tp * |
using | std::aligned_union< _Len, _Types >::type = typename aligned_storage< _S_len, alignment_value >::type |
using | std::decay< _Tp >::type = typename __decay_selector< _Tp >::type |
using | std::decay< _Tp & >::type = typename __decay_selector< _Tp >::type |
using | std::decay< _Tp && >::type = typename __decay_selector< _Tp >::type |
using | std::conditional< _Cond, _Iftrue, _Iffalse >::type = _Iftrue |
using | std::conditional< false, _Iftrue, _Iffalse >::type = _Iffalse |
using | std::common_reference< _Tp0 >::type = _Tp0 |
template<typename _Tp > | |
using | std::underlying_type_t = typename underlying_type< _Tp >::type |
using | std::integral_constant< _Tp, __v >::value_type = _Tp |
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] |
template<typename _Tp , typename... _Args> | |
constexpr bool | std::__is_nothrow_new_constructible |
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 = typename common_reference< _Tp... >::type |
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 |
Template utilities for compile-time introspection and modification, including type classification traits, type property inspection traits and type transformation traits.
Since
C++11
◆ __conditional_t
template<bool _Cond, typename _If , typename _Else >
using std::__conditional_t = typedef typename __conditional<_Cond>::template type<_If, _Else>
◆ __enable_if_t
template<bool _Cond, typename _Tp = void>
using std::__enable_if_t = typedef typename enable_if<_Cond, _Tp>::type
◆ __is_array_convertible
template<typename _ToElementType , typename _FromElementType >
◆ add_lvalue_reference_t
Alias template for add_lvalue_reference.
Definition at line 1783 of file type_traits.
◆ add_pointer_t
Alias template for add_pointer.
Definition at line 2232 of file type_traits.
◆ add_rvalue_reference_t
Alias template for add_rvalue_reference.
Definition at line 1787 of file type_traits.
◆ aligned_storage_t
template<size_t _Len, size_t _Align = __alignof__(typename __aligned_storage_msa<_Len>::__type)>
Alias template for aligned_storage.
Definition at line 2769 of file type_traits.
◆ aligned_union_t
template<size_t _Len, typename... _Types>
using std::aligned_union_t = typedef typename aligned_union<_Len, _Types...>::type
◆ common_reference_t
template<typename... _Tp>
◆ common_type_t
template<typename... _Tp>
Alias template for common_type.
Definition at line 2789 of file type_traits.
◆ conditional_t
template<bool _Cond, typename _Iftrue , typename _Iffalse >
Alias template for conditional.
Definition at line 2785 of file type_traits.
◆ decay_t
◆ enable_if_t
template<bool _Cond, typename _Tp = void>
◆ false_type
The type used as a compile-time boolean with false value.
Definition at line 116 of file type_traits.
◆ make_signed_t
Alias template for make_signed.
Definition at line 2118 of file type_traits.
◆ make_unsigned_t
Alias template for make_unsigned.
Definition at line 2122 of file type_traits.
◆ remove_all_extents_t
Alias template for remove_all_extents.
Definition at line 2172 of file type_traits.
◆ remove_extent_t
Alias template for remove_extent.
Definition at line 2168 of file type_traits.
◆ remove_pointer_t
Alias template for remove_pointer.
Definition at line 2228 of file type_traits.
◆ remove_reference_t
Alias template for remove_reference.
Definition at line 1779 of file type_traits.
◆ result_of_t
◆ true_type
The type used as a compile-time boolean with true value.
Definition at line 113 of file type_traits.
◆ type [1/44]
template<typename _Tp , _Tp __v>
◆ type [2/44]
◆ type [3/44]
template
template<typename _Tp , typename >
using std::__conditional< bool >::type = _Tp
◆ type [4/44]
template<typename , typename _Up >
using std::__conditional< false >::type = _Up
◆ type [5/44]
template<typename _Tp >
using std::__is_implicitly_default_constructible_impl< _Tp >::type = decltype(__test(declval<_Tp>()))
◆ 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 = typename is_void<_To>::type
◆ type [7/44]
template<typename _From , typename _To >
using std::__is_convertible_helper< _From, _To, false >::type = decltype(__test<_From, _To>(0))
◆ type [8/44]
◆ type [9/44]
◆ type [10/44]
◆ type [11/44]
◆ type [12/44]
◆ type [13/44]
◆ type [14/44]
◆ type [15/44]
◆ type [16/44]
◆ type [17/44]
◆ type [18/44]
◆ type [19/44]
◆ type [20/44]
◆ type [21/44]
◆ type [22/44]
◆ type [23/44]
◆ type [24/44]
◆ type [25/44]
template<typename _Tp >
using std::make_signed< _Tp >::type = typename __make_signed_selector<_Tp>::__type
◆ type [26/44]
◆ type [27/44]
template<typename _Tp , std::size_t _Size>
◆ type [28/44]
◆ type [29/44]
◆ type [30/44]
template<typename _Tp , std::size_t _Size>
◆ type [31/44]
◆ type [32/44]
template<typename _Tp , typename >
◆ type [33/44]
template<typename _Tp , typename _Up >
◆ type [34/44]
template<typename _Tp , typename = void>
◆ type [35/44]
◆ type [36/44]
template<typename _Tp >
using std::add_pointer< _Tp & >::type = _Tp*
◆ type [37/44]
template<typename _Tp >
using std::add_pointer< _Tp && >::type = _Tp*
◆ type [38/44]
template<size_t _Len, typename... _Types>
◆ type [39/44]
template<typename _Tp >
using std::decay< _Tp >::type = typename __decay_selector<_Tp>::type
◆ type [40/44]
template<typename _Tp >
using std::decay< _Tp & >::type = typename __decay_selector<_Tp>::type
◆ type [41/44]
template<typename _Tp >
using std::decay< _Tp && >::type = typename __decay_selector<_Tp>::type
◆ type [42/44]
template<bool _Cond, typename _Iftrue , typename _Iffalse >
◆ type [43/44]
template<typename _Iftrue , typename _Iffalse >
◆ type [44/44]
template<typename _Tp0 >
using std::common_reference< _Tp0 >::type = _Tp0
◆ underlying_type_t
Alias template for underlying_type.
Definition at line 2793 of file type_traits.
◆ value_type
template<typename _Tp , _Tp __v>
◆ is_corresponding_member()
template<typename _S1 , typename _S2 , typename _M1 , typename _M2 >
constexpr bool std::is_corresponding_member ( _M1 _S1::* __m1, _M2 _S2::* __m2 ) | constexprnoexcept |
---|
◆ 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 3861 of file type_traits.
◆ operator value_type()
template<typename _Tp , _Tp __v>
◆ swap() [1/2]
Swaps two values.
Parameters
__a | A thing of arbitrary type. |
---|---|
__b | Another thing of arbitrary type. |
Returns
Nothing.
Definition at line 214 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 238 of file move.h.
◆ __data [1/2]
template<std::size_t _Len>
unsigned char std::__aligned_storage_msa< _Len >::__type::__data[_Len]
◆ __data [2/2]
template<std::size_t _Len, std::size_t _Align = __alignof__(typename __aligned_storage_msa<_Len>::__type)>
◆ __is_nothrow_new_constructible
template<typename _Tp , typename... _Args>
constexpr bool std::__is_nothrow_new_constructible | inlineconstexpr |
---|
◆ _S_alignment [1/2]
template<typename... _Types>
const size_t std::__strictest_alignment< _Types >::_S_alignment | static |
---|
◆ _S_alignment [2/2]
template<typename _Tp , typename... _Types>
const size_t std::__strictest_alignment< _Tp, _Types... >::_S_alignment | static |
---|
◆ _S_size [1/2]
template<typename... _Types>
const size_t std::__strictest_alignment< _Types >::_S_size | static |
---|
◆ _S_size [2/2]
template<typename _Tp , typename... _Types>
const size_t std::__strictest_alignment< _Tp, _Types... >::_S_size | static |
---|
◆ alignment_value
template<size_t _Len, typename... _Types>
The value of the strictest alignment of _Types.
Definition at line 2317 of file type_traits.
◆ is_layout_compatible_v
template<typename _Tp , typename _Up >
constexpr bool std::is_layout_compatible_v | constexpr |
---|
◆ is_pointer_interconvertible_base_of_v
template<typename _Base , typename _Derived >
constexpr bool std::is_pointer_interconvertible_base_of_v | constexpr |
---|
◆ value
template<typename _Tp , _Tp __v>