29#ifndef _GLIBCXX_TYPE_TRAITS
30#define _GLIBCXX_TYPE_TRAITS 1
33#pragma GCC system_header
36#if __cplusplus < 201103L
42#define __glibcxx_want_bool_constant
43#define __glibcxx_want_bounded_array_traits
44#define __glibcxx_want_common_reference
45#define __glibcxx_want_constant_wrapper
46#define __glibcxx_want_has_unique_object_representations
47#define __glibcxx_want_integral_constant_callable
48#define __glibcxx_want_is_aggregate
49#define __glibcxx_want_is_constant_evaluated
50#define __glibcxx_want_is_final
51#define __glibcxx_want_is_implicit_lifetime
52#define __glibcxx_want_is_invocable
53#define __glibcxx_want_is_layout_compatible
54#define __glibcxx_want_is_nothrow_convertible
55#define __glibcxx_want_is_null_pointer
56#define __glibcxx_want_is_pointer_interconvertible
57#define __glibcxx_want_is_scoped_enum
58#define __glibcxx_want_is_swappable
59#define __glibcxx_want_is_virtual_base_of
60#define __glibcxx_want_logical_traits
61#define __glibcxx_want_reference_from_temporary
62#define __glibcxx_want_remove_cvref
63#define __glibcxx_want_result_of_sfinae
64#define __glibcxx_want_transformation_trait_aliases
65#define __glibcxx_want_type_identity
66#define __glibcxx_want_type_trait_variable_templates
67#define __glibcxx_want_unwrap_ref
68#define __glibcxx_want_void_t
73namespace std _GLIBCXX_VISIBILITY(default)
75_GLIBCXX_BEGIN_NAMESPACE_VERSION
77 template<
typename _Tp>
94 template<
typename _Tp, _Tp __v>
97 static constexpr _Tp value = __v;
98 using value_type = _Tp;
100 constexpr operator value_type()
const noexcept {
return value; }
102#ifdef __cpp_lib_integral_constant_callable
103 constexpr value_type operator()()
const noexcept {
return value; }
107#if ! __cpp_inline_variables
108 template<
typename _Tp, _Tp __v>
109 constexpr _Tp integral_constant<_Tp, __v>::value;
124#ifdef __cpp_lib_bool_constant
128 using bool_constant = __bool_constant<__v>;
135 template<
bool,
typename _Tp =
void>
140 template<
typename _Tp>
142 {
using type = _Tp; };
145 template<
bool _Cond,
typename _Tp =
void>
146 using __enable_if_t =
typename enable_if<_Cond, _Tp>::type;
151 template<
typename _Tp,
typename>
156 struct __conditional<false>
158 template<
typename,
typename _Up>
163 template<
bool _Cond,
typename _If,
typename _Else>
164 using __conditional_t
168 template <
typename _Type>
169 struct __type_identity
170 {
using type = _Type; };
172 template<
typename _Tp>
173 using __type_identity_t =
typename __type_identity<_Tp>::type;
178 template<
typename _Tp,
typename...>
179 using __first_t = _Tp;
182 template<
typename... _Bn>
184 __enable_if_t<!bool(_Bn::value)>...>;
186 template<
typename... _Bn>
189 template<
typename... _Bn>
190 auto __and_fn(
int) -> __first_t<
true_type,
191 __enable_if_t<bool(_Bn::value)>...>;
193 template<
typename... _Bn>
200 template<
typename... _Bn>
202 : decltype(__detail::__or_fn<_Bn...>(0))
205 template<
typename... _Bn>
207 : decltype(__detail::__and_fn<_Bn...>(0))
210 template<
typename _Pp>
212 : __bool_constant<!bool(_Pp::value)>
216#ifdef __cpp_lib_logical_traits
219 template<
typename... _Bn>
220 inline constexpr bool __or_v = __or_<_Bn...>::value;
221 template<
typename... _Bn>
222 inline constexpr bool __and_v = __and_<_Bn...>::value;
226 template<
typename ,
typename _B1,
typename... _Bn>
227 struct __disjunction_impl
228 {
using type = _B1; };
230 template<
typename _B1,
typename _B2,
typename... _Bn>
231 struct __disjunction_impl<__enable_if_t<!bool(_B1::value)>, _B1, _B2, _Bn...>
232 {
using type =
typename __disjunction_impl<void, _B2, _Bn...>::type; };
234 template<
typename ,
typename _B1,
typename... _Bn>
235 struct __conjunction_impl
236 {
using type = _B1; };
238 template<
typename _B1,
typename _B2,
typename... _Bn>
239 struct __conjunction_impl<__enable_if_t<bool(_B1::value)>, _B1, _B2, _Bn...>
240 {
using type =
typename __conjunction_impl<void, _B2, _Bn...>::type; };
244 template<
typename... _Bn>
246 : __detail::__conjunction_impl<void, _Bn...>::type
254 template<
typename... _Bn>
256 : __detail::__disjunction_impl<void, _Bn...>::type
264 template<
typename _Pp>
272 template<
typename... _Bn>
273 inline constexpr bool conjunction_v = conjunction<_Bn...>::value;
275 template<
typename... _Bn>
276 inline constexpr bool disjunction_v = disjunction<_Bn...>::value;
278 template<
typename _Pp>
279 inline constexpr bool negation_v = negation<_Pp>::value;
294 struct __is_array_unknown_bounds;
299 template<
typename _Tp>
300 using __maybe_complete_object_type
301 = __and_<is_object<_Tp>, __not_<__is_array_unknown_bounds<_Tp>>>;
307 template<
typename _Tp,
308 typename = __enable_if_t<__maybe_complete_object_type<_Tp>::value>,
309 size_t =
sizeof(_Tp)>
311 __is_complete_or_unbounded(__type_identity<_Tp>)
316 template<
typename _TypeIdentity,
317 typename _NestedType =
typename _TypeIdentity::type>
318 constexpr typename __not_<__maybe_complete_object_type<_NestedType>>::type
319 __is_complete_or_unbounded(_TypeIdentity)
323 template<
typename _Tp>
324 using __remove_cv_t =
typename remove_cv<_Tp>::type;
330 template<
typename _Tp>
339 struct is_void<const void>
340 :
public true_type { };
347 struct is_void<const volatile void>
356 enum class _Integer_kind { _None, _Signed, _Unsigned };
359 struct __is_integral_helper
361 {
static constexpr auto _S_kind = _Integer_kind::_None; };
364 struct __is_integral_helper<bool>
366 {
static constexpr auto _S_kind = _Integer_kind::_None; };
369 struct __is_integral_helper<char>
371 {
static constexpr auto _S_kind = _Integer_kind::_None; };
374 struct __is_integral_helper<signed char>
376 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
379 struct __is_integral_helper<unsigned char>
381 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
387 struct __is_integral_helper<wchar_t>
389 {
static constexpr auto _S_kind = _Integer_kind::_None; };
391#ifdef _GLIBCXX_USE_CHAR8_T
393 struct __is_integral_helper<char8_t>
395 {
static constexpr auto _S_kind = _Integer_kind::_None; };
399 struct __is_integral_helper<char16_t>
401 {
static constexpr auto _S_kind = _Integer_kind::_None; };
404 struct __is_integral_helper<char32_t>
406 {
static constexpr auto _S_kind = _Integer_kind::_None; };
409 struct __is_integral_helper<short>
411 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
414 struct __is_integral_helper<unsigned short>
416 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
419 struct __is_integral_helper<int>
421 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
424 struct __is_integral_helper<unsigned int>
426 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
429 struct __is_integral_helper<long>
431 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
434 struct __is_integral_helper<unsigned long>
436 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
439 struct __is_integral_helper<long long>
441 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
444 struct __is_integral_helper<unsigned long long>
446 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
450#if defined(__GLIBCXX_TYPE_INT_N_0)
453 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_0>
455 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
459 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_0>
461 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
463#if defined(__GLIBCXX_TYPE_INT_N_1)
466 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_1>
468 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
472 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_1>
474 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
476#if defined(__GLIBCXX_TYPE_INT_N_2)
479 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_2>
481 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
485 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_2>
487 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
489#if defined(__GLIBCXX_TYPE_INT_N_3)
492 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_3>
494 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
498 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_3>
500 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
503#if defined __SIZEOF_INT128__ && defined __STRICT_ANSI__
506 struct __is_integral_helper<__int128>
508 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
512 struct __is_integral_helper<unsigned __int128>
514 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
518 template<
typename _Tp>
519 using __is_signed_integer
520 = __bool_constant<__is_integral_helper<_Tp>::_S_kind
521 == _Integer_kind::_Signed>;
524 template<
typename _Tp>
525 using __is_unsigned_integer
526 = __bool_constant<__is_integral_helper<_Tp>::_S_kind
527 == _Integer_kind::_Unsigned>;
531 template<
typename _Tp>
532 using __is_signed_or_unsigned_integer
533 = __bool_constant<__is_integral_helper<_Tp>::_S_kind
534 != _Integer_kind::_None>;
539 template<
typename _Tp>
541 :
public __is_integral_helper<__remove_cv_t<_Tp>>
::type
546 struct __is_floating_point_helper
550 struct __is_floating_point_helper<float>
551 :
public true_type { };
554 struct __is_floating_point_helper<double>
558 struct __is_floating_point_helper<long double>
561#ifdef __STDCPP_FLOAT16_T__
563 struct __is_floating_point_helper<_Float16>
567#ifdef __STDCPP_FLOAT32_T__
569 struct __is_floating_point_helper<_Float32>
573#ifdef __STDCPP_FLOAT64_T__
575 struct __is_floating_point_helper<_Float64>
579#ifdef __STDCPP_FLOAT128_T__
581 struct __is_floating_point_helper<_Float128>
585#ifdef __STDCPP_BFLOAT16_T__
587 struct __is_floating_point_helper<__gnu_cxx::__bfloat16_t>
591#ifdef _GLIBCXX_USE_FLOAT128
593 struct __is_floating_point_helper<__float128>
599 template<
typename _Tp>
601 :
public __is_floating_point_helper<__remove_cv_t<_Tp>>
::type
605#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_array)
606 template<
typename _Tp>
608 :
public __bool_constant<__is_array(_Tp)>
615 template<
typename _Tp, std::
size_t _Size>
616 struct is_array<_Tp[_Size]>
617 :
public true_type { };
619 template<
typename _Tp>
625#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_pointer)
626 template<
typename _Tp>
628 :
public __bool_constant<__is_pointer(_Tp)>
631 template<
typename _Tp>
635 template<
typename _Tp>
636 struct is_pointer<_Tp*>
637 :
public true_type { };
639 template<
typename _Tp>
643 template<
typename _Tp>
647 template<
typename _Tp>
657 template<
typename _Tp>
666 template<
typename _Tp>
671#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_object_pointer)
672 template<
typename _Tp>
674 :
public __bool_constant<__is_member_object_pointer(_Tp)>
678 struct __is_member_object_pointer_helper
681 template<
typename _Tp,
typename _Cp>
682 struct __is_member_object_pointer_helper<_Tp _Cp::*>
683 :
public __not_<is_function<_Tp>>::type { };
686 template<
typename _Tp>
688 :
public __is_member_object_pointer_helper<__remove_cv_t<_Tp>>::type
692#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_function_pointer)
694 template<
typename _Tp>
696 :
public __bool_constant<__is_member_function_pointer(_Tp)>
700 struct __is_member_function_pointer_helper
703 template<
typename _Tp,
typename _Cp>
704 struct __is_member_function_pointer_helper<_Tp _Cp::*>
705 :
public is_function<_Tp>::type { };
708 template<
typename _Tp>
710 :
public __is_member_function_pointer_helper<__remove_cv_t<_Tp>>::type
715 template<
typename _Tp>
717 :
public __bool_constant<__is_enum(_Tp)>
721 template<
typename _Tp>
723 :
public __bool_constant<__is_union(_Tp)>
727 template<
typename _Tp>
729 :
public __bool_constant<__is_class(_Tp)>
733#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_function)
734 template<
typename _Tp>
736 :
public __bool_constant<__is_function(_Tp)>
739 template<
typename _Tp>
741 :
public __bool_constant<!is_const<const _Tp>::value> { };
743 template<
typename _Tp>
744 struct is_function<_Tp&>
745 :
public false_type { };
747 template<
typename _Tp>
752#if __cpp_impl_reflection >= 202506L
754 template<typename _Tp>
759 struct is_reflection<decltype(^^int)>
763 struct is_reflection<const decltype(^^int)>
767 struct is_reflection<volatile decltype(^^int)>
771 struct is_reflection<const volatile decltype(^^int)>
775#ifdef __cpp_lib_is_null_pointer
777 template<typename _Tp>
778 struct is_null_pointer
782 struct is_null_pointer<std::nullptr_t>
786 struct is_null_pointer<const std::nullptr_t>
790 struct is_null_pointer<volatile std::nullptr_t>
794 struct is_null_pointer<const volatile std::nullptr_t>
799 template<
typename _Tp>
800 struct __is_nullptr_t
801 :
public is_null_pointer<_Tp>
802 { } _GLIBCXX_DEPRECATED_SUGGEST(
"std::is_null_pointer");
808#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_reference)
809 template<
typename _Tp>
811 :
public __bool_constant<__is_reference(_Tp)>
814 template<
typename _Tp>
819 template<
typename _Tp>
820 struct is_reference<_Tp&>
824 template<
typename _Tp>
831 template<
typename _Tp>
833 :
public __or_<is_integral<_Tp>, is_floating_point<_Tp>>
::type
837 template<
typename _Tp>
839 :
public __or_<is_arithmetic<_Tp>, is_void<_Tp>,
841#if __cpp_impl_reflection >= 202506L
848#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_object)
849 template<
typename _Tp>
851 :
public __bool_constant<__is_object(_Tp)>
854 template<
typename _Tp>
856 :
public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
862 struct is_member_pointer;
865 template<
typename _Tp>
867 :
public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
868 is_member_pointer<_Tp>, is_null_pointer<_Tp>>
::type
872 template<
typename _Tp>
874 :
public __bool_constant<!is_fundamental<_Tp>::value> { };
877#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_pointer)
878 template<
typename _Tp>
880 :
public __bool_constant<__is_member_pointer(_Tp)>
884 template<
typename _Tp>
885 struct __is_member_pointer_helper
888 template<
typename _Tp,
typename _Cp>
889 struct __is_member_pointer_helper<_Tp _Cp::*>
890 :
public true_type { };
893 template<
typename _Tp>
895 :
public __is_member_pointer_helper<__remove_cv_t<_Tp>>::type
899 template<
typename,
typename>
903 template<
typename _Tp,
typename... _Types>
904 using __is_one_of = __or_<is_same<_Tp, _Types>...>;
907 template<
typename...>
using __void_t = void;
913#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_const)
914 template<
typename _Tp>
916 :
public __bool_constant<__is_const(_Tp)>
923 template<
typename _Tp>
924 struct is_const<_Tp const>
925 :
public true_type { };
929#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_volatile)
930 template<
typename _Tp>
932 :
public __bool_constant<__is_volatile(_Tp)>
939 template<
typename _Tp>
940 struct is_volatile<_Tp volatile>
941 :
public true_type { };
951 template<
typename _Tp>
953 _GLIBCXX26_DEPRECATED_SUGGEST(
"is_trivially_default_constructible && is_trivially_copyable")
955 : public __bool_constant<__is_trivial(_Tp)>
957 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
958 "template argument must be a complete class or an unbounded array");
962 template<
typename _Tp>
964 :
public __bool_constant<__is_trivially_copyable(_Tp)>
966 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
967 "template argument must be a complete class or an unbounded array");
971 template<
typename _Tp>
973 :
public __bool_constant<__is_standard_layout(_Tp)>
975 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
976 "template argument must be a complete class or an unbounded array");
984 template<
typename _Tp>
986 _GLIBCXX20_DEPRECATED_SUGGEST(
"is_standard_layout && is_trivial")
988 : public __bool_constant<__is_pod(_Tp)>
990 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
991 "template argument must be a complete class or an unbounded array");
998 template<
typename _Tp>
1000 _GLIBCXX17_DEPRECATED
1002 :
public __bool_constant<__is_literal_type(_Tp)>
1004 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1005 "template argument must be a complete class or an unbounded array");
1009 template<
typename _Tp>
1011 :
public __bool_constant<__is_empty(_Tp)>
1015 template<
typename _Tp>
1017 :
public __bool_constant<__is_polymorphic(_Tp)>
1020#ifdef __cpp_lib_is_final
1023 template<typename _Tp>
1025 :
public __bool_constant<__is_final(_Tp)>
1030 template<
typename _Tp>
1032 :
public __bool_constant<__is_abstract(_Tp)>
1036 template<
typename _Tp,
1038 struct __is_signed_helper
1041 template<
typename _Tp>
1042 struct __is_signed_helper<_Tp, true>
1043 :
public __bool_constant<_Tp(-1) < _Tp(0)>
1048 template<typename _Tp>
1050 : public __is_signed_helper<_Tp>::type
1054 template<typename _Tp>
1056 : public __and_<is_arithmetic<_Tp>, __not_<is_signed<_Tp>>>::type
1060 template<typename _Tp, typename _Up = _Tp&&>
1064 template<typename _Tp>
1069 template<typename _Tp>
1070 auto declval() noexcept -> decltype(__declval<_Tp>(0));
1076 template<typename _Tp>
1077 struct __is_array_known_bounds
1081 template<
typename _Tp,
size_t _Size>
1082 struct __is_array_known_bounds<_Tp[_Size]>
1086 template<
typename _Tp>
1087 struct __is_array_unknown_bounds
1091 template<
typename _Tp>
1092 struct __is_array_unknown_bounds<_Tp[]>
1099#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_destructible)
1101 template<
typename _Tp>
1103 :
public __bool_constant<__is_destructible(_Tp)>
1113 struct __do_is_destructible_impl
1115 template<typename _Tp, typename = decltype(declval<_Tp&>().~_Tp())>
1122 template<
typename _Tp>
1123 struct __is_destructible_impl
1124 :
public __do_is_destructible_impl
1126 using type =
decltype(__test<_Tp>(0));
1129 template<
typename _Tp,
1130 bool = __or_<is_void<_Tp>,
1131 __is_array_unknown_bounds<_Tp>,
1134 struct __is_destructible_safe;
1136 template<
typename _Tp>
1137 struct __is_destructible_safe<_Tp, false, false>
1138 :
public __is_destructible_impl<typename
1139 remove_all_extents<_Tp>::type>::type
1142 template<
typename _Tp>
1143 struct __is_destructible_safe<_Tp, true, false>
1146 template<
typename _Tp>
1147 struct __is_destructible_safe<_Tp, false, true>
1152 template<
typename _Tp>
1154 :
public __is_destructible_safe<_Tp>::type
1156 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1157 "template argument must be a complete class or an unbounded array");
1161#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_destructible)
1163 template<
typename _Tp>
1165 :
public __bool_constant<__is_nothrow_destructible(_Tp)>
1174 struct __do_is_nt_destructible_impl
1176 template<
typename _Tp>
1177 static __bool_constant<noexcept(declval<_Tp&>().~_Tp())>
1184 template<
typename _Tp>
1185 struct __is_nt_destructible_impl
1186 :
public __do_is_nt_destructible_impl
1188 using type =
decltype(__test<_Tp>(0));
1191 template<
typename _Tp,
1192 bool = __or_<is_void<_Tp>,
1193 __is_array_unknown_bounds<_Tp>,
1196 struct __is_nt_destructible_safe;
1198 template<
typename _Tp>
1199 struct __is_nt_destructible_safe<_Tp, false, false>
1200 :
public __is_nt_destructible_impl<typename
1201 remove_all_extents<_Tp>::type>::type
1204 template<
typename _Tp>
1205 struct __is_nt_destructible_safe<_Tp, true, false>
1208 template<
typename _Tp>
1209 struct __is_nt_destructible_safe<_Tp, false, true>
1214 template<
typename _Tp>
1216 :
public __is_nt_destructible_safe<_Tp>::type
1218 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1219 "template argument must be a complete class or an unbounded array");
1224 template<
typename _Tp,
typename... _Args>
1225 using __is_constructible_impl
1226 = __bool_constant<__is_constructible(_Tp, _Args...)>;
1230 template<
typename _Tp,
typename... _Args>
1232 :
public __is_constructible_impl<_Tp, _Args...>
1234 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1235 "template argument must be a complete class or an unbounded array");
1239 template<
typename _Tp>
1241 :
public __is_constructible_impl<_Tp>
1243 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1244 "template argument must be a complete class or an unbounded array");
1248#if _GLIBCXX_USE_BUILTIN_TRAIT(__add_lvalue_reference)
1249 template<
typename _Tp>
1250 using __add_lval_ref_t = __add_lvalue_reference(_Tp);
1252 template<
typename _Tp,
typename =
void>
1253 struct __add_lvalue_reference_helper
1254 {
using type = _Tp; };
1256 template<
typename _Tp>
1257 struct __add_lvalue_reference_helper<_Tp, __void_t<_Tp&>>
1258 {
using type = _Tp&; };
1260 template<
typename _Tp>
1261 using __add_lval_ref_t =
typename __add_lvalue_reference_helper<_Tp>::type;
1266 template<
typename _Tp>
1268 :
public __is_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>>
1270 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1271 "template argument must be a complete class or an unbounded array");
1275#if _GLIBCXX_USE_BUILTIN_TRAIT(__add_rvalue_reference)
1276 template<
typename _Tp>
1277 using __add_rval_ref_t = __add_rvalue_reference(_Tp);
1279 template<
typename _Tp,
typename =
void>
1280 struct __add_rvalue_reference_helper
1281 {
using type = _Tp; };
1283 template<
typename _Tp>
1284 struct __add_rvalue_reference_helper<_Tp, __void_t<_Tp&&>>
1285 {
using type = _Tp&&; };
1287 template<
typename _Tp>
1288 using __add_rval_ref_t =
typename __add_rvalue_reference_helper<_Tp>::type;
1293 template<
typename _Tp>
1295 :
public __is_constructible_impl<_Tp, __add_rval_ref_t<_Tp>>
1297 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1298 "template argument must be a complete class or an unbounded array");
1302 template<
typename _Tp,
typename... _Args>
1303 using __is_nothrow_constructible_impl
1304 = __bool_constant<__is_nothrow_constructible(_Tp, _Args...)>;
1308 template<
typename _Tp,
typename... _Args>
1310 :
public __is_nothrow_constructible_impl<_Tp, _Args...>
1312 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1313 "template argument must be a complete class or an unbounded array");
1317 template<
typename _Tp>
1319 :
public __is_nothrow_constructible_impl<_Tp>
1321 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1322 "template argument must be a complete class or an unbounded array");
1326 template<
typename _Tp>
1328 :
public __is_nothrow_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>>
1330 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1331 "template argument must be a complete class or an unbounded array");
1335 template<
typename _Tp>
1337 :
public __is_nothrow_constructible_impl<_Tp, __add_rval_ref_t<_Tp>>
1339 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1340 "template argument must be a complete class or an unbounded array");
1344 template<
typename _Tp,
typename _Up>
1345 using __is_assignable_impl = __bool_constant<__is_assignable(_Tp, _Up)>;
1349 template<
typename _Tp,
typename _Up>
1351 :
public __is_assignable_impl<_Tp, _Up>
1353 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1354 "template argument must be a complete class or an unbounded array");
1358 template<
typename _Tp>
1360 :
public __is_assignable_impl<__add_lval_ref_t<_Tp>,
1361 __add_lval_ref_t<const _Tp>>
1363 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1364 "template argument must be a complete class or an unbounded array");
1368 template<
typename _Tp>
1370 :
public __is_assignable_impl<__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>>
1372 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1373 "template argument must be a complete class or an unbounded array");
1377 template<
typename _Tp,
typename _Up>
1378 using __is_nothrow_assignable_impl
1379 = __bool_constant<__is_nothrow_assignable(_Tp, _Up)>;
1383 template<
typename _Tp,
typename _Up>
1385 :
public __is_nothrow_assignable_impl<_Tp, _Up>
1387 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1388 "template argument must be a complete class or an unbounded array");
1392 template<
typename _Tp>
1394 :
public __is_nothrow_assignable_impl<__add_lval_ref_t<_Tp>,
1395 __add_lval_ref_t<const _Tp>>
1397 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1398 "template argument must be a complete class or an unbounded array");
1402 template<
typename _Tp>
1404 :
public __is_nothrow_assignable_impl<__add_lval_ref_t<_Tp>,
1405 __add_rval_ref_t<_Tp>>
1407 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1408 "template argument must be a complete class or an unbounded array");
1412 template<
typename _Tp,
typename... _Args>
1413 using __is_trivially_constructible_impl
1414 = __bool_constant<__is_trivially_constructible(_Tp, _Args...)>;
1418 template<
typename _Tp,
typename... _Args>
1420 :
public __is_trivially_constructible_impl<_Tp, _Args...>
1422 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1423 "template argument must be a complete class or an unbounded array");
1427 template<
typename _Tp>
1429 :
public __is_trivially_constructible_impl<_Tp>
1431 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1432 "template argument must be a complete class or an unbounded array");
1435#if __cpp_variable_templates && __cpp_concepts
1436 template<
typename _Tp>
1437 constexpr bool __is_implicitly_default_constructible_v
1438 =
requires (void(&__f)(_Tp)) { __f({}); };
1440 template<
typename _Tp>
1441 struct __is_implicitly_default_constructible
1442 : __bool_constant<__is_implicitly_default_constructible_v<_Tp>>
1445 struct __do_is_implicitly_default_constructible_impl
1447 template <
typename _Tp>
1448 static void __helper(
const _Tp&);
1450 template <
typename _Tp>
1452 decltype(__helper<const _Tp&>({}))* = 0);
1457 template<
typename _Tp>
1458 struct __is_implicitly_default_constructible_impl
1459 :
public __do_is_implicitly_default_constructible_impl
1464 template<
typename _Tp>
1465 struct __is_implicitly_default_constructible_safe
1466 :
public __is_implicitly_default_constructible_impl<_Tp>::type
1469 template <
typename _Tp>
1470 struct __is_implicitly_default_constructible
1471 :
public __and_<__is_constructible_impl<_Tp>,
1472 __is_implicitly_default_constructible_safe<_Tp>>::type
1477 template<
typename _Tp>
1479 :
public __is_trivially_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>>
1481 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1482 "template argument must be a complete class or an unbounded array");
1486 template<
typename _Tp>
1488 :
public __is_trivially_constructible_impl<_Tp, __add_rval_ref_t<_Tp>>
1490 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1491 "template argument must be a complete class or an unbounded array");
1495 template<
typename _Tp,
typename _Up>
1496 using __is_trivially_assignable_impl
1497 = __bool_constant<__is_trivially_assignable(_Tp, _Up)>;
1501 template<
typename _Tp,
typename _Up>
1503 :
public __is_trivially_assignable_impl<_Tp, _Up>
1505 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1506 "template argument must be a complete class or an unbounded array");
1510 template<
typename _Tp>
1512 :
public __is_trivially_assignable_impl<__add_lval_ref_t<_Tp>,
1513 __add_lval_ref_t<const _Tp>>
1515 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1516 "template argument must be a complete class or an unbounded array");
1520 template<
typename _Tp>
1522 :
public __is_trivially_assignable_impl<__add_lval_ref_t<_Tp>,
1523 __add_rval_ref_t<_Tp>>
1525 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1526 "template argument must be a complete class or an unbounded array");
1529#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_trivially_destructible)
1531 template<
typename _Tp>
1533 :
public __bool_constant<__is_trivially_destructible(_Tp)>
1537 template<
typename _Tp>
1539 :
public __and_<__is_destructible_safe<_Tp>,
1540 __bool_constant<__has_trivial_destructor(_Tp)>>
::type
1542 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1543 "template argument must be a complete class or an unbounded array");
1548 template<
typename _Tp>
1550 :
public __bool_constant<__has_virtual_destructor(_Tp)>
1552 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1553 "template argument must be a complete class or an unbounded array");
1560 template<
typename _Tp>
1564 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1565 "template argument must be a complete class or an unbounded array");
1569#if _GLIBCXX_USE_BUILTIN_TRAIT(__array_rank) \
1570 && (!defined(__clang__) || __clang_major__ >= 20)
1571 template<
typename _Tp>
1579 template<
typename _Tp, std::
size_t _Size>
1580 struct rank<_Tp[_Size]>
1581 :
public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
1583 template<
typename _Tp>
1589 template<
typename,
unsigned _U
int = 0>
1593 template<
typename _Tp,
size_t _Size>
1594 struct extent<_Tp[_Size], 0>
1597 template<
typename _Tp,
unsigned _U
int,
size_t _Size>
1598 struct extent<_Tp[_Size], _Uint>
1599 :
public extent<_Tp, _Uint - 1>::type { };
1601 template<
typename _Tp>
1605 template<
typename _Tp,
unsigned _U
int>
1606 struct extent<_Tp[], _Uint>
1607 :
public extent<_Tp, _Uint - 1>::type { };
1613#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_same)
1614 template<
typename _Tp,
typename _Up>
1616 :
public __bool_constant<__is_same(_Tp, _Up)>
1619 template<
typename _Tp,
typename _Up>
1624 template<
typename _Tp>
1625 struct is_same<_Tp, _Tp>
1631 template<
typename _Base,
typename _Derived>
1633 :
public __bool_constant<__is_base_of(_Base, _Derived)>
1636#ifdef __cpp_lib_is_virtual_base_of
1639 template<typename _Base, typename _Derived>
1640 struct is_virtual_base_of
1641 :
public bool_constant<__builtin_is_virtual_base_of(_Base, _Derived)>
1645#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_convertible)
1646 template<
typename _From,
typename _To>
1647 struct is_convertible
1648 :
public __bool_constant<__is_convertible(_From, _To)>
1651 template<
typename _From,
typename _To,
1654 struct __is_convertible_helper
1656 using type =
typename is_void<_To>::type;
1659#pragma GCC diagnostic push
1660#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
1661 template<
typename _From,
typename _To>
1662 class __is_convertible_helper<_From, _To, false>
1664 template<
typename _To1>
1665 static void __test_aux(_To1)
noexcept;
1667 template<
typename _From1,
typename _To1,
1672 template<
typename,
typename>
1677 using type =
decltype(__test<_From, _To>(0));
1679#pragma GCC diagnostic pop
1682 template<
typename _From,
typename _To>
1683 struct is_convertible
1684 :
public __is_convertible_helper<_From, _To>::type
1689 template<
typename _ToElementType,
typename _FromElementType>
1690 using __is_array_convertible
1691 = is_convertible<_FromElementType(*)[], _ToElementType(*)[]>;
1693#ifdef __cpp_lib_is_nothrow_convertible
1695#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_convertible)
1697 template<
typename _From,
typename _To>
1698 inline constexpr bool is_nothrow_convertible_v
1699 = __is_nothrow_convertible(_From, _To);
1702 template<
typename _From,
typename _To>
1703 struct is_nothrow_convertible
1704 :
public bool_constant<is_nothrow_convertible_v<_From, _To>>
1707 template<
typename _From,
typename _To,
1710 struct __is_nt_convertible_helper
1714#pragma GCC diagnostic push
1715#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
1716 template<
typename _From,
typename _To>
1717 class __is_nt_convertible_helper<_From, _To, false>
1719 template<
typename _To1>
1720 static void __test_aux(_To1)
noexcept;
1722 template<
typename _From1,
typename _To1>
1727 template<
typename,
typename>
1732 using type =
decltype(__test<_From, _To>(0));
1734#pragma GCC diagnostic pop
1737 template<
typename _From,
typename _To>
1738 struct is_nothrow_convertible
1739 :
public __is_nt_convertible_helper<_From, _To>::type
1743 template<
typename _From,
typename _To>
1744 inline constexpr bool is_nothrow_convertible_v
1745 = is_nothrow_convertible<_From, _To>::value;
1749#pragma GCC diagnostic push
1750#pragma GCC diagnostic ignored "-Wc++14-extensions"
1751 template<
typename _Tp,
typename... _Args>
1752 struct __is_nothrow_new_constructible_impl
1754 noexcept(::new(std::declval<void*>()) _Tp(std::declval<_Args>()...))
1758 template<
typename _Tp,
typename... _Args>
1759 _GLIBCXX17_INLINE
constexpr bool __is_nothrow_new_constructible
1761 __is_nothrow_new_constructible_impl<_Tp, _Args...>>::value;
1762#pragma GCC diagnostic pop
1767 template<
typename _Tp>
1769 {
using type = _Tp; };
1771 template<
typename _Tp>
1773 {
using type = _Tp; };
1776 template<
typename _Tp>
1778 {
using type = _Tp; };
1780 template<
typename _Tp>
1782 {
using type = _Tp; };
1785#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_cv)
1786 template<
typename _Tp>
1788 {
using type = __remove_cv(_Tp); };
1790 template<
typename _Tp>
1792 {
using type = _Tp; };
1794 template<
typename _Tp>
1795 struct remove_cv<const _Tp>
1796 {
using type = _Tp; };
1798 template<
typename _Tp>
1800 {
using type = _Tp; };
1802 template<
typename _Tp>
1804 {
using type = _Tp; };
1808 template<
typename _Tp>
1810 {
using type = _Tp
const; };
1813 template<
typename _Tp>
1815 {
using type = _Tp
volatile; };
1818 template<
typename _Tp>
1820 {
using type = _Tp
const volatile; };
1822#ifdef __cpp_lib_transformation_trait_aliases
1824 template<typename _Tp>
1825 using remove_const_t =
typename remove_const<_Tp>::type;
1828 template<
typename _Tp>
1829 using remove_volatile_t =
typename remove_volatile<_Tp>::type;
1832 template<
typename _Tp>
1833 using remove_cv_t =
typename remove_cv<_Tp>::type;
1836 template<
typename _Tp>
1837 using add_const_t =
typename add_const<_Tp>::type;
1840 template<
typename _Tp>
1841 using add_volatile_t =
typename add_volatile<_Tp>::type;
1844 template<
typename _Tp>
1845 using add_cv_t =
typename add_cv<_Tp>::type;
1851#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_reference)
1852 template<
typename _Tp>
1854 {
using type = __remove_reference(_Tp); };
1856 template<
typename _Tp>
1858 {
using type = _Tp; };
1860 template<
typename _Tp>
1861 struct remove_reference<_Tp&>
1862 {
using type = _Tp; };
1864 template<
typename _Tp>
1866 {
using type = _Tp; };
1870 template<
typename _Tp>
1872 {
using type = __add_lval_ref_t<_Tp>; };
1875 template<
typename _Tp>
1877 {
using type = __add_rval_ref_t<_Tp>; };
1879#if __cplusplus > 201103L
1881 template<
typename _Tp>
1885 template<
typename _Tp>
1889 template<
typename _Tp>
1898 template<
typename _Unqualified,
bool _IsConst,
bool _IsVol>
1899 struct __cv_selector;
1901 template<
typename _Unqualified>
1902 struct __cv_selector<_Unqualified, false, false>
1903 {
using __type = _Unqualified; };
1905 template<
typename _Unqualified>
1906 struct __cv_selector<_Unqualified, false, true>
1907 {
using __type =
volatile _Unqualified; };
1909 template<
typename _Unqualified>
1910 struct __cv_selector<_Unqualified, true, false>
1911 {
using __type =
const _Unqualified; };
1913 template<
typename _Unqualified>
1914 struct __cv_selector<_Unqualified, true, true>
1915 {
using __type =
const volatile _Unqualified; };
1917 template<
typename _Qualified,
typename _Unqualified,
1920 class __match_cv_qualifiers
1922 using __match = __cv_selector<_Unqualified, _IsConst, _IsVol>;
1925 using __type =
typename __match::__type;
1929 template<
typename _Tp>
1930 struct __make_unsigned
1931 {
using __type = _Tp; };
1934 struct __make_unsigned<char>
1935 {
using __type =
unsigned char; };
1938 struct __make_unsigned<signed char>
1939 {
using __type =
unsigned char; };
1942 struct __make_unsigned<short>
1943 {
using __type =
unsigned short; };
1946 struct __make_unsigned<int>
1947 {
using __type =
unsigned int; };
1950 struct __make_unsigned<long>
1951 {
using __type =
unsigned long; };
1954 struct __make_unsigned<long long>
1955 {
using __type =
unsigned long long; };
1957#if defined(__GLIBCXX_TYPE_INT_N_0)
1960 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_0>
1961 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_0; };
1963#if defined(__GLIBCXX_TYPE_INT_N_1)
1966 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_1>
1967 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_1; };
1969#if defined(__GLIBCXX_TYPE_INT_N_2)
1972 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_2>
1973 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_2; };
1975#if defined(__GLIBCXX_TYPE_INT_N_3)
1978 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_3>
1979 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_3; };
1981#if defined __SIZEOF_INT128__ && defined __STRICT_ANSI__
1984 struct __make_unsigned<__int128>
1985 {
using __type =
unsigned __int128; };
1989 template<
typename _Tp,
1991 bool _IsEnum = __is_enum(_Tp)>
1992 class __make_unsigned_selector;
1994 template<
typename _Tp>
1995 class __make_unsigned_selector<_Tp, true, false>
1997 using __unsigned_type
1998 =
typename __make_unsigned<__remove_cv_t<_Tp>>::__type;
2002 =
typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type;
2005 class __make_unsigned_selector_base
2008 template<
typename...>
struct _List { };
2010 template<
typename _Tp,
typename... _Up>
2011 struct _List<_Tp, _Up...> : _List<_Up...>
2012 {
static constexpr size_t __size =
sizeof(_Tp); };
2014 template<
size_t _Sz,
typename _Tp,
bool = (_Sz <= _Tp::__size)>
2017 template<
size_t _Sz,
typename _U
int,
typename... _UInts>
2018 struct __select<_Sz, _List<_Uint, _UInts...>,
true>
2019 {
using __type = _Uint; };
2021 template<
size_t _Sz,
typename _Uint,
typename... _UInts>
2022 struct __select<_Sz, _List<_Uint, _UInts...>, false>
2023 : __select<_Sz, _List<_UInts...>>
2028 template<
typename _Tp>
2029 class __make_unsigned_selector<_Tp, false, true>
2030 : __make_unsigned_selector_base
2034 using _UInts = _List<
unsigned char,
unsigned short,
unsigned int,
2035 unsigned long,
unsigned long long
2036#ifdef __SIZEOF_INT128__
2041 using __unsigned_type =
typename __select<
sizeof(_Tp), _UInts>::__type;
2045 =
typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type;
2053 struct __make_unsigned<wchar_t>
2056 =
typename __make_unsigned_selector<wchar_t, false, true>::__type;
2059#ifdef _GLIBCXX_USE_CHAR8_T
2061 struct __make_unsigned<char8_t>
2064 =
typename __make_unsigned_selector<char8_t, false, true>::__type;
2069 struct __make_unsigned<char16_t>
2072 =
typename __make_unsigned_selector<char16_t, false, true>::__type;
2076 struct __make_unsigned<char32_t>
2079 =
typename __make_unsigned_selector<char32_t, false, true>::__type;
2087 template<
typename _Tp>
2089 {
using type =
typename __make_unsigned_selector<_Tp>::__type; };
2100 template<
typename _Tp>
2101 struct __make_signed
2102 {
using __type = _Tp; };
2105 struct __make_signed<char>
2106 {
using __type =
signed char; };
2109 struct __make_signed<unsigned char>
2110 {
using __type =
signed char; };
2113 struct __make_signed<unsigned short>
2114 {
using __type =
signed short; };
2117 struct __make_signed<unsigned int>
2118 {
using __type =
signed int; };
2121 struct __make_signed<unsigned long>
2122 {
using __type =
signed long; };
2125 struct __make_signed<unsigned long long>
2126 {
using __type =
signed long long; };
2128#if defined(__GLIBCXX_TYPE_INT_N_0)
2131 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_0>
2132 {
using __type = __GLIBCXX_TYPE_INT_N_0; };
2134#if defined(__GLIBCXX_TYPE_INT_N_1)
2137 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_1>
2138 {
using __type = __GLIBCXX_TYPE_INT_N_1; };
2140#if defined(__GLIBCXX_TYPE_INT_N_2)
2143 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_2>
2144 {
using __type = __GLIBCXX_TYPE_INT_N_2; };
2146#if defined(__GLIBCXX_TYPE_INT_N_3)
2149 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_3>
2150 {
using __type = __GLIBCXX_TYPE_INT_N_3; };
2152#if defined __SIZEOF_INT128__ && defined __STRICT_ANSI__
2155 struct __make_signed<unsigned __int128>
2156 {
using __type = __int128; };
2160 template<
typename _Tp,
2162 bool _IsEnum = __is_enum(_Tp)>
2163 class __make_signed_selector;
2165 template<
typename _Tp>
2166 class __make_signed_selector<_Tp, true, false>
2169 =
typename __make_signed<__remove_cv_t<_Tp>>::__type;
2173 =
typename __match_cv_qualifiers<_Tp, __signed_type>::__type;
2177 template<
typename _Tp>
2178 class __make_signed_selector<_Tp, false, true>
2180 using __unsigned_type =
typename __make_unsigned_selector<_Tp>::__type;
2183 using __type =
typename __make_signed_selector<__unsigned_type>::__type;
2191 struct __make_signed<wchar_t>
2194 =
typename __make_signed_selector<wchar_t, false, true>::__type;
2197#if defined(_GLIBCXX_USE_CHAR8_T)
2199 struct __make_signed<char8_t>
2202 =
typename __make_signed_selector<char8_t, false, true>::__type;
2207 struct __make_signed<char16_t>
2210 =
typename __make_signed_selector<char16_t, false, true>::__type;
2214 struct __make_signed<char32_t>
2217 =
typename __make_signed_selector<char32_t, false, true>::__type;
2225 template<
typename _Tp>
2227 {
using type =
typename __make_signed_selector<_Tp>::__type; };
2233 template<>
struct make_signed<bool const volatile>;
2235#if __cplusplus > 201103L
2237 template<
typename _Tp>
2241 template<
typename _Tp>
2248#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_extent)
2249 template<
typename _Tp>
2251 {
using type = __remove_extent(_Tp); };
2253 template<
typename _Tp>
2255 {
using type = _Tp; };
2257 template<
typename _Tp, std::
size_t _Size>
2258 struct remove_extent<_Tp[_Size]>
2259 {
using type = _Tp; };
2261 template<
typename _Tp>
2263 {
using type = _Tp; };
2267#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_all_extents)
2268 template<
typename _Tp>
2270 {
using type = __remove_all_extents(_Tp); };
2272 template<
typename _Tp>
2274 {
using type = _Tp; };
2276 template<
typename _Tp, std::
size_t _Size>
2277 struct remove_all_extents<_Tp[_Size]>
2278 {
using type =
typename remove_all_extents<_Tp>::type; };
2280 template<
typename _Tp>
2282 {
using type =
typename remove_all_extents<_Tp>::type; };
2285#if __cplusplus > 201103L
2287 template<
typename _Tp>
2291 template<
typename _Tp>
2298#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_pointer)
2299 template<
typename _Tp>
2301 {
using type = __remove_pointer(_Tp); };
2303 template<
typename _Tp,
typename>
2304 struct __remove_pointer_helper
2305 {
using type = _Tp; };
2307 template<
typename _Tp,
typename _Up>
2308 struct __remove_pointer_helper<_Tp, _Up*>
2309 {
using type = _Up; };
2311 template<
typename _Tp>
2313 :
public __remove_pointer_helper<_Tp, __remove_cv_t<_Tp>>
2318#if _GLIBCXX_USE_BUILTIN_TRAIT(__add_pointer)
2319 template<
typename _Tp>
2321 {
using type = __add_pointer(_Tp); };
2323 template<
typename _Tp,
typename =
void>
2324 struct __add_pointer_helper
2325 {
using type = _Tp; };
2327 template<
typename _Tp>
2328 struct __add_pointer_helper<_Tp, __void_t<_Tp*>>
2329 {
using type = _Tp*; };
2331 template<
typename _Tp>
2333 :
public __add_pointer_helper<_Tp>
2336 template<
typename _Tp>
2338 {
using type = _Tp*; };
2340 template<
typename _Tp>
2342 {
using type = _Tp*; };
2345#if __cplusplus > 201103L
2347 template<
typename _Tp>
2351 template<
typename _Tp>
2358 struct __attribute__((__aligned__)) __aligned_storage_max_align_t
2362 __aligned_storage_default_alignment([[__maybe_unused__]]
size_t __len)
2364#if _GLIBCXX_INLINE_VERSION
2366 = integral_constant<size_t,
alignof(__aligned_storage_max_align_t)>;
2368 return __len > (_Max_align::value / 2)
2370#
if _GLIBCXX_USE_BUILTIN_TRAIT(__builtin_clzg)
2371 : 1 << (__SIZE_WIDTH__ - __builtin_clzg(__len - 1u));
2373 : 1 << (__LLONG_WIDTH__ - __builtin_clzll(__len - 1ull));
2378 return alignof(__aligned_storage_max_align_t);
2414 template<
size_t _Len,
2415 size_t _Align = __aligned_storage_default_alignment(_Len)>
2417 _GLIBCXX23_DEPRECATED
2422 alignas(_Align)
unsigned char __data[_Len];
2426 template <
typename... _Types>
2427 struct __strictest_alignment
2429 static const size_t _S_alignment = 0;
2430 static const size_t _S_size = 0;
2433 template <
typename _Tp,
typename... _Types>
2434 struct __strictest_alignment<_Tp, _Types...>
2436 static const size_t _S_alignment =
2437 alignof(_Tp) > __strictest_alignment<_Types...>::_S_alignment
2438 ?
alignof(_Tp) : __strictest_alignment<_Types...>::_S_alignment;
2439 static const size_t _S_size =
2440 sizeof(_Tp) > __strictest_alignment<_Types...>::_S_size
2441 ?
sizeof(_Tp) : __strictest_alignment<_Types...>::_S_size;
2444#pragma GCC diagnostic push
2445#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2459 template <
size_t _Len,
typename... _Types>
2461 _GLIBCXX23_DEPRECATED
2465 static_assert(
sizeof...(_Types) != 0,
"At least one type is required");
2467 using __strictest = __strictest_alignment<_Types...>;
2468 static const size_t _S_len = _Len > __strictest::_S_size
2469 ? _Len : __strictest::_S_size;
2474 using type =
typename aligned_storage<_S_len, alignment_value>::type;
2477 template <
size_t _Len,
typename... _Types>
2478 const size_t aligned_union<_Len, _Types...>::alignment_value;
2479#pragma GCC diagnostic pop
2483#if _GLIBCXX_USE_BUILTIN_TRAIT(__decay)
2484 template<
typename _Tp>
2486 {
using type = __decay(_Tp); };
2490 template<
typename _Up>
2491 struct __decay_selector
2492 : __conditional_t<is_const<const _Up>::value,
2497 template<
typename _Up,
size_t _Nm>
2498 struct __decay_selector<_Up[_Nm]>
2499 {
using type = _Up*; };
2501 template<
typename _Up>
2502 struct __decay_selector<_Up[]>
2503 {
using type = _Up*; };
2508 template<
typename _Tp>
2510 {
using type =
typename __decay_selector<_Tp>::type; };
2512 template<
typename _Tp>
2514 {
using type =
typename __decay_selector<_Tp>::type; };
2516 template<
typename _Tp>
2518 {
using type =
typename __decay_selector<_Tp>::type; };
2524 template<
typename _Tp>
2525 struct __strip_reference_wrapper
2530 template<
typename _Tp>
2533 using __type = _Tp&;
2537 template<
typename _Tp>
2538 using __decay_t =
typename decay<_Tp>::type;
2540 template<
typename _Tp>
2541 using __decay_and_strip = __strip_reference_wrapper<__decay_t<_Tp>>;
2547 template<
typename... _Cond>
2548 using _Require = __enable_if_t<__and_<_Cond...>::value>;
2551 template<
typename _Tp>
2552 using __remove_cvref_t
2558 template<
bool _Cond,
typename _Iftrue,
typename _Iffalse>
2560 {
using type = _Iftrue; };
2563 template<
typename _Iftrue,
typename _Iffalse>
2565 {
using type = _Iffalse; };
2568 template<
typename... _Tp>
2580 template<
typename _Tp>
2581 struct __success_type
2582 {
using type = _Tp; };
2584 struct __failure_type
2587 struct __do_common_type_impl
2589 template<
typename _Tp,
typename _Up>
2595 template<
typename _Tp,
typename _Up>
2596 static __success_type<__decay_t<__cond_t<_Tp, _Up>>>
2599#if __cplusplus > 201703L
2602 template<
typename _Tp,
typename _Up>
2603 static __success_type<__remove_cvref_t<__cond_t<const _Tp&, const _Up&>>>
2607 template<
typename,
typename>
2608 static __failure_type
2611 template<
typename _Tp,
typename _Up>
2612 static decltype(_S_test_2<_Tp, _Up>(0))
2622 template<
typename _Tp0>
2628 template<
typename _Tp1,
typename _Tp2,
2629 typename _Dp1 = __decay_t<_Tp1>,
typename _Dp2 = __decay_t<_Tp2>>
2630 struct __common_type_impl
2634 using type = common_type<_Dp1, _Dp2>;
2637 template<
typename _Tp1,
typename _Tp2>
2638 struct __common_type_impl<_Tp1, _Tp2, _Tp1, _Tp2>
2639 :
private __do_common_type_impl
2643 using type =
decltype(_S_test<_Tp1, _Tp2>(0));
2647 template<
typename _Tp1,
typename _Tp2>
2649 :
public __common_type_impl<_Tp1, _Tp2>::type
2652 template<
typename...>
2653 struct __common_type_pack
2656 template<
typename,
typename,
typename =
void>
2657 struct __common_type_fold;
2660 template<
typename _Tp1,
typename _Tp2,
typename... _Rp>
2662 :
public __common_type_fold<common_type<_Tp1, _Tp2>,
2663 __common_type_pack<_Rp...>>
2669 template<
typename _CTp,
typename... _Rp>
2670 struct __common_type_fold<_CTp, __common_type_pack<_Rp...>,
2671 __void_t<typename _CTp::
type>>
2676 template<
typename _CTp,
typename _Rp>
2677 struct __common_type_fold<_CTp, _Rp, void>
2680 template<
typename _Tp,
bool = __is_enum(_Tp)>
2681 struct __underlying_type_impl
2683 using type = __underlying_type(_Tp);
2686 template<
typename _Tp>
2687 struct __underlying_type_impl<_Tp, false>
2692 template<
typename _Tp>
2694 :
public __underlying_type_impl<_Tp>
2698 template<
typename _Tp>
2699 struct __declval_protector
2701 static const bool __stop =
false;
2709 template<
typename _Tp>
2710 auto declval() noexcept -> decltype(__declval<_Tp>(0))
2712 static_assert(__declval_protector<_Tp>::__stop,
2713 "declval() must not be used!");
2714 return __declval<_Tp>(0);
2718 template<
typename _Signature>
2724 struct __invoke_memfun_ref { };
2725 struct __invoke_memfun_deref { };
2726 struct __invoke_memobj_ref { };
2727 struct __invoke_memobj_deref { };
2728 struct __invoke_other { };
2731 template<
typename _Tp,
typename _Tag>
2732 struct __result_of_success : __success_type<_Tp>
2733 {
using __invoke_type = _Tag; };
2736 struct __result_of_memfun_ref_impl
2738 template<
typename _Fp,
typename _Tp1,
typename... _Args>
2739 static __result_of_success<
decltype(
2741 ), __invoke_memfun_ref> _S_test(
int);
2743 template<
typename...>
2744 static __failure_type _S_test(...);
2747 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2748 struct __result_of_memfun_ref
2749 :
private __result_of_memfun_ref_impl
2751 using type =
decltype(_S_test<_MemPtr, _Arg, _Args...>(0));
2755 struct __result_of_memfun_deref_impl
2757 template<
typename _Fp,
typename _Tp1,
typename... _Args>
2758 static __result_of_success<
decltype(
2760 ), __invoke_memfun_deref> _S_test(
int);
2762 template<
typename...>
2763 static __failure_type _S_test(...);
2766 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2767 struct __result_of_memfun_deref
2768 :
private __result_of_memfun_deref_impl
2770 using type =
decltype(_S_test<_MemPtr, _Arg, _Args...>(0));
2774 struct __result_of_memobj_ref_impl
2776 template<
typename _Fp,
typename _Tp1>
2777 static __result_of_success<
decltype(
2779 ), __invoke_memobj_ref> _S_test(
int);
2781 template<
typename,
typename>
2782 static __failure_type _S_test(...);
2785 template<
typename _MemPtr,
typename _Arg>
2786 struct __result_of_memobj_ref
2787 :
private __result_of_memobj_ref_impl
2789 using type =
decltype(_S_test<_MemPtr, _Arg>(0));
2793 struct __result_of_memobj_deref_impl
2795 template<
typename _Fp,
typename _Tp1>
2796 static __result_of_success<
decltype(
2798 ), __invoke_memobj_deref> _S_test(
int);
2800 template<
typename,
typename>
2801 static __failure_type _S_test(...);
2804 template<
typename _MemPtr,
typename _Arg>
2805 struct __result_of_memobj_deref
2806 :
private __result_of_memobj_deref_impl
2808 using type =
decltype(_S_test<_MemPtr, _Arg>(0));
2811 template<
typename _MemPtr,
typename _Arg>
2812 struct __result_of_memobj;
2814 template<
typename _Res,
typename _Class,
typename _Arg>
2815 struct __result_of_memobj<_Res _Class::*, _Arg>
2817 using _Argval = __remove_cvref_t<_Arg>;
2818 using _MemPtr = _Res _Class::*;
2819 using type =
typename __conditional_t<__or_<is_same<_Argval, _Class>,
2820 is_base_of<_Class, _Argval>>::value,
2821 __result_of_memobj_ref<_MemPtr, _Arg>,
2822 __result_of_memobj_deref<_MemPtr, _Arg>
2826 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2827 struct __result_of_memfun;
2829 template<
typename _Res,
typename _Class,
typename _Arg,
typename... _Args>
2830 struct __result_of_memfun<_Res _Class::*, _Arg, _Args...>
2832 using _Argval =
typename remove_reference<_Arg>::type;
2833 using _MemPtr = _Res _Class::*;
2834 using type =
typename __conditional_t<is_base_of<_Class, _Argval>::value,
2835 __result_of_memfun_ref<_MemPtr, _Arg, _Args...>,
2836 __result_of_memfun_deref<_MemPtr, _Arg, _Args...>
2845 template<
typename _Tp,
typename _Up = __remove_cvref_t<_Tp>>
2851 template<
typename _Tp,
typename _Up>
2857 template<bool, bool,
typename _Functor,
typename... _ArgTypes>
2858 struct __result_of_impl
2860 using type = __failure_type;
2863 template<
typename _MemPtr,
typename _Arg>
2864 struct __result_of_impl<true, false, _MemPtr, _Arg>
2865 :
public __result_of_memobj<__decay_t<_MemPtr>,
2866 typename __inv_unwrap<_Arg>::type>
2869 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2870 struct __result_of_impl<false, true, _MemPtr, _Arg, _Args...>
2871 :
public __result_of_memfun<__decay_t<_MemPtr>,
2872 typename __inv_unwrap<_Arg>::type, _Args...>
2876 struct __result_of_other_impl
2878 template<
typename _Fn,
typename... _Args>
2879 static __result_of_success<
decltype(
2881 ), __invoke_other> _S_test(
int);
2883 template<
typename...>
2884 static __failure_type _S_test(...);
2887 template<
typename _Functor,
typename... _ArgTypes>
2888 struct __result_of_impl<false, false, _Functor, _ArgTypes...>
2889 :
private __result_of_other_impl
2891 using type =
decltype(_S_test<_Functor, _ArgTypes...>(0));
2895 template<
typename _Functor,
typename... _ArgTypes>
2896 struct __invoke_result
2897 :
public __result_of_impl<
2898 is_member_object_pointer<
2899 typename remove_reference<_Functor>::type
2901 is_member_function_pointer<
2902 typename remove_reference<_Functor>::type
2904 _Functor, _ArgTypes...
2909 template<
typename _Fn,
typename... _Args>
2910 using __invoke_result_t =
typename __invoke_result<_Fn, _Args...>::type;
2913 template<
typename _Functor,
typename... _ArgTypes>
2914 struct result_of<_Functor(_ArgTypes...)>
2915 :
public __invoke_result<_Functor, _ArgTypes...>
2916 { } _GLIBCXX17_DEPRECATED_SUGGEST(
"std::invoke_result");
2918#if __cplusplus >= 201402L
2919#pragma GCC diagnostic push
2920#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2922 template<
size_t _Len,
2923 size_t _Align = __aligned_storage_default_alignment(_Len)>
2924 using aligned_storage_t _GLIBCXX23_DEPRECATED =
typename aligned_storage<_Len, _Align>::type;
2926 template <
size_t _Len,
typename... _Types>
2927 using aligned_union_t _GLIBCXX23_DEPRECATED =
typename aligned_union<_Len, _Types...>
::type;
2928#pragma GCC diagnostic pop
2931 template<
typename _Tp>
2932 using decay_t =
typename decay<_Tp>::type;
2935 template<
bool _Cond,
typename _Tp =
void>
2939 template<
bool _Cond,
typename _Iftrue,
typename _Iffalse>
2940 using conditional_t =
typename conditional<_Cond, _Iftrue, _Iffalse>::type;
2943 template<
typename... _Tp>
2947 template<
typename _Tp>
2951 template<
typename _Tp>
2955#ifdef __cpp_lib_void_t
2957 template<typename...> using void_t = void;
2967 template<
typename _Def,
template<
typename...>
class _Op,
typename... _Args>
2968 struct __detected_or
2975 template<
typename _Def,
template<
typename...>
class _Op,
typename... _Args>
2976 requires requires {
typename _Op<_Args...>; }
2977 struct __detected_or<_Def, _Op, _Args...>
2979 using type = _Op<_Args...>;
2984 template<
typename _Default,
typename _AlwaysVoid,
2985 template<
typename...>
class _Op,
typename... _Args>
2988 using type = _Default;
2993 template<
typename _Default,
template<
typename...>
class _Op,
2995 struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...>
2997 using type = _Op<_Args...>;
3001 template<
typename _Default,
template<
typename...>
class _Op,
3003 using __detected_or = __detector<_Default, void, _Op, _Args...>;
3007 template<
typename _Default,
template<
typename...>
class _Op,
3009 using __detected_or_t
3010 =
typename __detected_or<_Default, _Op, _Args...>::type;
3016#define _GLIBCXX_HAS_NESTED_TYPE(_NTYPE) \
3017 template<typename _Tp, typename = __void_t<>> \
3018 struct __has_##_NTYPE \
3021 template<typename _Tp> \
3022 struct __has_##_NTYPE<_Tp, __void_t<typename _Tp::_NTYPE>> \
3026 template <
typename _Tp>
3027 struct __is_swappable;
3029 template <
typename _Tp>
3030 struct __is_nothrow_swappable;
3037 template<
typename _Tp>
3038 struct __is_tuple_like
3039 :
public __is_tuple_like_impl<__remove_cvref_t<_Tp>>::type
3043 template<
typename _Tp>
3044 _GLIBCXX20_CONSTEXPR
3046 _Require<__not_<__is_tuple_like<_Tp>>,
3050 noexcept(__and_<is_nothrow_move_constructible<_Tp>,
3053 template<
typename _Tp,
size_t _Nm>
3054 _GLIBCXX20_CONSTEXPR
3056 __enable_if_t<__is_swappable<_Tp>::value>
3057 swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
3058 noexcept(__is_nothrow_swappable<_Tp>::value);
3061 namespace __swappable_details {
3064 struct __do_is_swappable_impl
3066 template<
typename _Tp,
typename
3068 static true_type __test(
int);
3074 struct __do_is_nothrow_swappable_impl
3076 template<
typename _Tp>
3077 static __bool_constant<
3087 template<
typename _Tp>
3088 struct __is_swappable_impl
3089 :
public __swappable_details::__do_is_swappable_impl
3091 using type =
decltype(__test<_Tp>(0));
3094 template<
typename _Tp>
3095 struct __is_nothrow_swappable_impl
3096 :
public __swappable_details::__do_is_nothrow_swappable_impl
3098 using type =
decltype(__test<_Tp>(0));
3101 template<
typename _Tp>
3102 struct __is_swappable
3103 :
public __is_swappable_impl<_Tp>::type
3106 template<
typename _Tp>
3107 struct __is_nothrow_swappable
3108 :
public __is_nothrow_swappable_impl<_Tp>::type
3112#ifdef __cpp_lib_is_swappable
3116 template<
typename _Tp>
3118 :
public __is_swappable_impl<_Tp>::type
3120 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3121 "template argument must be a complete class or an unbounded array");
3125 template<
typename _Tp>
3126 struct is_nothrow_swappable
3127 :
public __is_nothrow_swappable_impl<_Tp>::type
3129 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3130 "template argument must be a complete class or an unbounded array");
3133#if __cplusplus >= 201402L
3135 template<
typename _Tp>
3136 _GLIBCXX17_INLINE
constexpr bool is_swappable_v =
3137 is_swappable<_Tp>::value;
3140 template<
typename _Tp>
3141 _GLIBCXX17_INLINE
constexpr bool is_nothrow_swappable_v =
3142 is_nothrow_swappable<_Tp>::value;
3146 namespace __swappable_with_details {
3149 struct __do_is_swappable_with_impl
3151 template<
typename _Tp,
typename _Up,
typename
3157 template<
typename,
typename>
3161 struct __do_is_nothrow_swappable_with_impl
3163 template<
typename _Tp,
typename _Up>
3164 static __bool_constant<
3170 template<
typename,
typename>
3176 template<
typename _Tp,
typename _Up>
3177 struct __is_swappable_with_impl
3178 :
public __swappable_with_details::__do_is_swappable_with_impl
3180 using type =
decltype(__test<_Tp, _Up>(0));
3184 template<
typename _Tp>
3185 struct __is_swappable_with_impl<_Tp&, _Tp&>
3186 :
public __swappable_details::__do_is_swappable_impl
3188 using type =
decltype(__test<_Tp&>(0));
3191 template<
typename _Tp,
typename _Up>
3192 struct __is_nothrow_swappable_with_impl
3193 :
public __swappable_with_details::__do_is_nothrow_swappable_with_impl
3195 using type =
decltype(__test<_Tp, _Up>(0));
3199 template<
typename _Tp>
3200 struct __is_nothrow_swappable_with_impl<_Tp&, _Tp&>
3201 :
public __swappable_details::__do_is_nothrow_swappable_impl
3203 using type =
decltype(__test<_Tp&>(0));
3208 template<
typename _Tp,
typename _Up>
3209 struct is_swappable_with
3210 :
public __is_swappable_with_impl<_Tp, _Up>::type
3212 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3213 "first template argument must be a complete class or an unbounded array");
3214 static_assert(std::__is_complete_or_unbounded(__type_identity<_Up>{}),
3215 "second template argument must be a complete class or an unbounded array");
3219 template<
typename _Tp,
typename _Up>
3220 struct is_nothrow_swappable_with
3221 :
public __is_nothrow_swappable_with_impl<_Tp, _Up>::type
3223 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3224 "first template argument must be a complete class or an unbounded array");
3225 static_assert(std::__is_complete_or_unbounded(__type_identity<_Up>{}),
3226 "second template argument must be a complete class or an unbounded array");
3229#if __cplusplus >= 201402L
3231 template<
typename _Tp,
typename _Up>
3232 _GLIBCXX17_INLINE
constexpr bool is_swappable_with_v =
3233 is_swappable_with<_Tp, _Up>::value;
3236 template<
typename _Tp,
typename _Up>
3237 _GLIBCXX17_INLINE
constexpr bool is_nothrow_swappable_with_v =
3238 is_nothrow_swappable_with<_Tp, _Up>::value;
3248 template<
typename _Result,
typename _Ret,
3250 struct __is_invocable_impl
3257 template<
typename _Result,
typename _Ret>
3258 struct __is_invocable_impl<_Result, _Ret,
3260 __void_t<typename _Result::
type>>
3266#pragma GCC diagnostic push
3267#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
3269 template<
typename _Result,
typename _Ret>
3270 struct __is_invocable_impl<_Result, _Ret,
3272 __void_t<typename _Result::
type>>
3276 using _Res_t =
typename _Result::type;
3280 static _Res_t _S_get() noexcept;
3283 template<typename _Tp>
3284 static
void _S_conv(__type_identity_t<_Tp>) noexcept;
3287 template<typename _Tp,
3288 bool _Nothrow = noexcept(_S_conv<_Tp>(_S_get())),
3289 typename = decltype(_S_conv<_Tp>(_S_get())),
3290#if __has_builtin(__reference_converts_from_temporary)
3291 bool _Dangle = __reference_converts_from_temporary(_Tp, _Res_t)
3293 bool _Dangle =
false
3296 static __bool_constant<_Nothrow && !_Dangle>
3299 template<
typename _Tp,
bool = false>
3305 using type =
decltype(_S_test<_Ret,
true>(1));
3308 using __nothrow_conv =
decltype(_S_test<_Ret>(1));
3310#pragma GCC diagnostic pop
3312 template<
typename _Fn,
typename... _ArgTypes>
3313 struct __is_invocable
3314#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_invocable)
3315 : __bool_constant<__is_invocable(_Fn, _ArgTypes...)>
3317 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type
3321 template<
typename _Fn,
typename _Tp,
typename... _Args>
3322 constexpr bool __call_is_nt(__invoke_memfun_ref)
3324 using _Up =
typename __inv_unwrap<_Tp>::type;
3329 template<
typename _Fn,
typename _Tp,
typename... _Args>
3330 constexpr bool __call_is_nt(__invoke_memfun_deref)
3336 template<
typename _Fn,
typename _Tp>
3337 constexpr bool __call_is_nt(__invoke_memobj_ref)
3339 using _Up =
typename __inv_unwrap<_Tp>::type;
3343 template<
typename _Fn,
typename _Tp>
3344 constexpr bool __call_is_nt(__invoke_memobj_deref)
3349 template<
typename _Fn,
typename... _Args>
3350 constexpr bool __call_is_nt(__invoke_other)
3355 template<
typename _Result,
typename _Fn,
typename... _Args>
3356 struct __call_is_nothrow
3358 std::__call_is_nt<_Fn, _Args...>(typename _Result::__invoke_type{})
3362 template<
typename _Fn,
typename... _Args>
3363 using __call_is_nothrow_
3364 = __call_is_nothrow<__invoke_result<_Fn, _Args...>, _Fn, _Args...>;
3367 template<
typename _Fn,
typename... _Args>
3368 struct __is_nothrow_invocable
3369#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_invocable)
3370 : __bool_constant<__is_nothrow_invocable(_Fn, _Args...)>
3372 : __and_<__is_invocable<_Fn, _Args...>,
3373 __call_is_nothrow_<_Fn, _Args...>>::type
3377#pragma GCC diagnostic push
3378#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
3379 struct __nonesuchbase {};
3380 struct __nonesuch :
private __nonesuchbase {
3381 ~__nonesuch() =
delete;
3382 __nonesuch(__nonesuch
const&) =
delete;
3383 void operator=(__nonesuch
const&) =
delete;
3385#pragma GCC diagnostic pop
3388#ifdef __cpp_lib_is_invocable
3390 template<typename _Functor, typename... _ArgTypes>
3391 struct invoke_result
3392 :
public __invoke_result<_Functor, _ArgTypes...>
3394 static_assert(std::__is_complete_or_unbounded(__type_identity<_Functor>{}),
3395 "_Functor must be a complete class or an unbounded array");
3396 static_assert((std::__is_complete_or_unbounded(
3397 __type_identity<_ArgTypes>{}) && ...),
3398 "each argument type must be a complete class or an unbounded array");
3402 template<
typename _Fn,
typename... _Args>
3403 using invoke_result_t =
typename invoke_result<_Fn, _Args...>::type;
3406 template<
typename _Fn,
typename... _ArgTypes>
3408#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_invocable)
3409 :
public __bool_constant<__is_invocable(_Fn, _ArgTypes...)>
3411 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type
3414 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3415 "_Fn must be a complete class or an unbounded array");
3416 static_assert((std::__is_complete_or_unbounded(
3417 __type_identity<_ArgTypes>{}) && ...),
3418 "each argument type must be a complete class or an unbounded array");
3422 template<
typename _Ret,
typename _Fn,
typename... _ArgTypes>
3423 struct is_invocable_r
3424 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>::type
3426 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3427 "_Fn must be a complete class or an unbounded array");
3428 static_assert((std::__is_complete_or_unbounded(
3429 __type_identity<_ArgTypes>{}) && ...),
3430 "each argument type must be a complete class or an unbounded array");
3431 static_assert(std::__is_complete_or_unbounded(__type_identity<_Ret>{}),
3432 "_Ret must be a complete class or an unbounded array");
3436 template<
typename _Fn,
typename... _ArgTypes>
3437 struct is_nothrow_invocable
3438#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_invocable)
3439 :
public __bool_constant<__is_nothrow_invocable(_Fn, _ArgTypes...)>
3441 : __and_<__is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>,
3442 __call_is_nothrow_<_Fn, _ArgTypes...>>::type
3445 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3446 "_Fn must be a complete class or an unbounded array");
3447 static_assert((std::__is_complete_or_unbounded(
3448 __type_identity<_ArgTypes>{}) && ...),
3449 "each argument type must be a complete class or an unbounded array");
3456 template<
typename _Result,
typename _Ret>
3457 using __is_nt_invocable_impl
3458 =
typename __is_invocable_impl<_Result, _Ret>::__nothrow_conv;
3462 template<
typename _Ret,
typename _Fn,
typename... _ArgTypes>
3463 struct is_nothrow_invocable_r
3464 : __and_<__is_nt_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>,
3465 __call_is_nothrow_<_Fn, _ArgTypes...>>::type
3467 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3468 "_Fn must be a complete class or an unbounded array");
3469 static_assert((std::__is_complete_or_unbounded(
3470 __type_identity<_ArgTypes>{}) && ...),
3471 "each argument type must be a complete class or an unbounded array");
3472 static_assert(std::__is_complete_or_unbounded(__type_identity<_Ret>{}),
3473 "_Ret must be a complete class or an unbounded array");
3477#if __cpp_lib_type_trait_variable_templates
3492template <
typename _Tp>
3494template <
typename _Tp>
3495 inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value;
3496template <
typename _Tp>
3498template <
typename _Tp>
3501#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_array)
3502template <
typename _Tp>
3503 inline constexpr bool is_array_v = __is_array(_Tp);
3505template <
typename _Tp>
3506 inline constexpr bool is_array_v =
false;
3507template <
typename _Tp>
3508 inline constexpr bool is_array_v<_Tp[]> =
true;
3509template <
typename _Tp,
size_t _Num>
3510 inline constexpr bool is_array_v<_Tp[_Num]> =
true;
3513#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_pointer)
3514template <
typename _Tp>
3515 inline constexpr bool is_pointer_v = __is_pointer(_Tp);
3517template <
typename _Tp>
3518 inline constexpr bool is_pointer_v =
false;
3519template <
typename _Tp>
3520 inline constexpr bool is_pointer_v<_Tp*> =
true;
3521template <
typename _Tp>
3522 inline constexpr bool is_pointer_v<_Tp* const> =
true;
3523template <
typename _Tp>
3524 inline constexpr bool is_pointer_v<_Tp* volatile> =
true;
3525template <
typename _Tp>
3526 inline constexpr bool is_pointer_v<_Tp* const volatile> =
true;
3529template <
typename _Tp>
3530 inline constexpr bool is_lvalue_reference_v =
false;
3531template <
typename _Tp>
3532 inline constexpr bool is_lvalue_reference_v<_Tp&> =
true;
3533template <
typename _Tp>
3534 inline constexpr bool is_rvalue_reference_v =
false;
3535template <
typename _Tp>
3536 inline constexpr bool is_rvalue_reference_v<_Tp&&> =
true;
3538#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_object_pointer)
3539template <
typename _Tp>
3540 inline constexpr bool is_member_object_pointer_v =
3541 __is_member_object_pointer(_Tp);
3543template <
typename _Tp>
3544 inline constexpr bool is_member_object_pointer_v =
3548#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_function_pointer)
3549template <
typename _Tp>
3550 inline constexpr bool is_member_function_pointer_v =
3551 __is_member_function_pointer(_Tp);
3553template <
typename _Tp>
3554 inline constexpr bool is_member_function_pointer_v =
3558#if __cpp_impl_reflection >= 202506L
3559template <
typename _Tp>
3560 inline constexpr bool is_reflection_v =
false;
3562 inline constexpr bool is_reflection_v<
decltype(^^int)> =
true;
3564 inline constexpr bool is_reflection_v<
const decltype(^^int)> =
true;
3566 inline constexpr bool is_reflection_v<
volatile decltype(^^int)> =
true;
3568 inline constexpr bool is_reflection_v<
const volatile decltype(^^int)> =
true;
3571template <
typename _Tp>
3572 inline constexpr bool is_enum_v = __is_enum(_Tp);
3573template <
typename _Tp>
3574 inline constexpr bool is_union_v = __is_union(_Tp);
3575template <
typename _Tp>
3576 inline constexpr bool is_class_v = __is_class(_Tp);
3579#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_reference)
3580template <
typename _Tp>
3581 inline constexpr bool is_reference_v = __is_reference(_Tp);
3583template <
typename _Tp>
3584 inline constexpr bool is_reference_v =
false;
3585template <
typename _Tp>
3586 inline constexpr bool is_reference_v<_Tp&> =
true;
3587template <
typename _Tp>
3588 inline constexpr bool is_reference_v<_Tp&&> =
true;
3591template <
typename _Tp>
3593template <
typename _Tp>
3596#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_object)
3597template <
typename _Tp>
3598 inline constexpr bool is_object_v = __is_object(_Tp);
3600template <
typename _Tp>
3604template <
typename _Tp>
3606template <
typename _Tp>
3607 inline constexpr bool is_compound_v = !is_fundamental_v<_Tp>;
3609#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_pointer)
3610template <
typename _Tp>
3611 inline constexpr bool is_member_pointer_v = __is_member_pointer(_Tp);
3613template <
typename _Tp>
3617#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_const)
3618template <
typename _Tp>
3619 inline constexpr bool is_const_v = __is_const(_Tp);
3621template <
typename _Tp>
3622 inline constexpr bool is_const_v =
false;
3623template <
typename _Tp>
3624 inline constexpr bool is_const_v<const _Tp> =
true;
3627#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_function)
3628template <
typename _Tp>
3629 inline constexpr bool is_function_v = __is_function(_Tp);
3631template <
typename _Tp>
3632 inline constexpr bool is_function_v = !is_const_v<const _Tp>;
3633template <
typename _Tp>
3634 inline constexpr bool is_function_v<_Tp&> =
false;
3635template <
typename _Tp>
3636 inline constexpr bool is_function_v<_Tp&&> =
false;
3639#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_volatile)
3640template <
typename _Tp>
3641 inline constexpr bool is_volatile_v = __is_volatile(_Tp);
3643template <
typename _Tp>
3644 inline constexpr bool is_volatile_v =
false;
3645template <
typename _Tp>
3646 inline constexpr bool is_volatile_v<volatile _Tp> =
true;
3649template <
typename _Tp>
3650 _GLIBCXX26_DEPRECATED_SUGGEST(
"is_trivially_default_constructible_v && is_trivially_copyable_v")
3651 inline constexpr
bool is_trivial_v = __is_trivial(_Tp);
3652template <typename _Tp>
3653 inline constexpr
bool is_trivially_copyable_v = __is_trivially_copyable(_Tp);
3654template <typename _Tp>
3655 inline constexpr
bool is_standard_layout_v = __is_standard_layout(_Tp);
3656template <typename _Tp>
3657 _GLIBCXX20_DEPRECATED_SUGGEST(
"is_standard_layout_v && is_trivial_v")
3658 inline constexpr
bool is_pod_v = __is_pod(_Tp);
3659template <typename _Tp>
3660 _GLIBCXX17_DEPRECATED
3661 inline constexpr
bool is_literal_type_v = __is_literal_type(_Tp);
3662template <typename _Tp>
3663 inline constexpr
bool is_empty_v = __is_empty(_Tp);
3664template <typename _Tp>
3665 inline constexpr
bool is_polymorphic_v = __is_polymorphic(_Tp);
3666template <typename _Tp>
3667 inline constexpr
bool is_abstract_v = __is_abstract(_Tp);
3668template <typename _Tp>
3669 inline constexpr
bool is_final_v = __is_final(_Tp);
3671template <typename _Tp>
3672 inline constexpr
bool is_signed_v =
is_signed<_Tp>::value;
3673template <typename _Tp>
3674 inline constexpr
bool is_unsigned_v =
is_unsigned<_Tp>::value;
3676template <typename _Tp, typename... _Args>
3677 inline constexpr
bool is_constructible_v = __is_constructible(_Tp, _Args...);
3678template <typename _Tp>
3679 inline constexpr
bool is_default_constructible_v = __is_constructible(_Tp);
3680template <typename _Tp>
3681 inline constexpr
bool is_copy_constructible_v
3682 = __is_constructible(_Tp, __add_lval_ref_t<const _Tp>);
3683template <typename _Tp>
3684 inline constexpr
bool is_move_constructible_v
3685 = __is_constructible(_Tp, __add_rval_ref_t<_Tp>);
3687template <typename _Tp, typename _Up>
3688 inline constexpr
bool is_assignable_v = __is_assignable(_Tp, _Up);
3689template <typename _Tp>
3690 inline constexpr
bool is_copy_assignable_v
3691 = __is_assignable(__add_lval_ref_t<_Tp>, __add_lval_ref_t<const _Tp>);
3692template <typename _Tp>
3693 inline constexpr
bool is_move_assignable_v
3694 = __is_assignable(__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>);
3696#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_destructible)
3697template <
typename _Tp>
3698 inline constexpr bool is_destructible_v = __is_destructible(_Tp);
3700template <
typename _Tp>
3704template <
typename _Tp,
typename... _Args>
3705 inline constexpr bool is_trivially_constructible_v
3706 = __is_trivially_constructible(_Tp, _Args...);
3707template <
typename _Tp>
3708 inline constexpr bool is_trivially_default_constructible_v
3709 = __is_trivially_constructible(_Tp);
3710template <
typename _Tp>
3711 inline constexpr bool is_trivially_copy_constructible_v
3712 = __is_trivially_constructible(_Tp, __add_lval_ref_t<const _Tp>);
3713template <
typename _Tp>
3714 inline constexpr bool is_trivially_move_constructible_v
3715 = __is_trivially_constructible(_Tp, __add_rval_ref_t<_Tp>);
3717template <
typename _Tp,
typename _Up>
3718 inline constexpr bool is_trivially_assignable_v
3719 = __is_trivially_assignable(_Tp, _Up);
3720template <
typename _Tp>
3721 inline constexpr bool is_trivially_copy_assignable_v
3722 = __is_trivially_assignable(__add_lval_ref_t<_Tp>,
3723 __add_lval_ref_t<const _Tp>);
3724template <
typename _Tp>
3725 inline constexpr bool is_trivially_move_assignable_v
3726 = __is_trivially_assignable(__add_lval_ref_t<_Tp>,
3727 __add_rval_ref_t<_Tp>);
3729#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_trivially_destructible)
3730template <
typename _Tp>
3731 inline constexpr bool is_trivially_destructible_v
3732 = __is_trivially_destructible(_Tp);
3734template <
typename _Tp>
3735 inline constexpr bool is_trivially_destructible_v =
false;
3737template <
typename _Tp>
3738 requires (!is_reference_v<_Tp>) &&
requires (_Tp& __t) { __t.~_Tp(); }
3739 inline constexpr bool is_trivially_destructible_v<_Tp>
3740 = __has_trivial_destructor(_Tp);
3741template <
typename _Tp>
3742 inline constexpr bool is_trivially_destructible_v<_Tp&> =
true;
3743template <
typename _Tp>
3744 inline constexpr bool is_trivially_destructible_v<_Tp&&> =
true;
3745template <
typename _Tp,
size_t _Nm>
3746 inline constexpr bool is_trivially_destructible_v<_Tp[_Nm]>
3747 = is_trivially_destructible_v<_Tp>;
3749template <
typename _Tp>
3750 inline constexpr bool is_trivially_destructible_v =
3754template <
typename _Tp,
typename... _Args>
3755 inline constexpr bool is_nothrow_constructible_v
3756 = __is_nothrow_constructible(_Tp, _Args...);
3757template <
typename _Tp>
3758 inline constexpr bool is_nothrow_default_constructible_v
3759 = __is_nothrow_constructible(_Tp);
3760template <
typename _Tp>
3761 inline constexpr bool is_nothrow_copy_constructible_v
3762 = __is_nothrow_constructible(_Tp, __add_lval_ref_t<const _Tp>);
3763template <
typename _Tp>
3764 inline constexpr bool is_nothrow_move_constructible_v
3765 = __is_nothrow_constructible(_Tp, __add_rval_ref_t<_Tp>);
3767template <
typename _Tp,
typename _Up>
3768 inline constexpr bool is_nothrow_assignable_v
3769 = __is_nothrow_assignable(_Tp, _Up);
3770template <
typename _Tp>
3771 inline constexpr bool is_nothrow_copy_assignable_v
3772 = __is_nothrow_assignable(__add_lval_ref_t<_Tp>,
3773 __add_lval_ref_t<const _Tp>);
3774template <
typename _Tp>
3775 inline constexpr bool is_nothrow_move_assignable_v
3776 = __is_nothrow_assignable(__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>);
3778#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_destructible)
3779template <
typename _Tp>
3780 inline constexpr bool is_nothrow_destructible_v
3781 = __is_nothrow_destructible(_Tp);
3783template <
typename _Tp>
3784 inline constexpr bool is_nothrow_destructible_v =
3788template <
typename _Tp>
3789 inline constexpr bool has_virtual_destructor_v
3790 = __has_virtual_destructor(_Tp);
3792template <
typename _Tp>
3793 inline constexpr size_t alignment_of_v = alignment_of<_Tp>::value;
3795#if _GLIBCXX_USE_BUILTIN_TRAIT(__array_rank) \
3796 && (!defined(__clang__) || __clang_major__ >= 20)
3797template <
typename _Tp>
3798 inline constexpr size_t rank_v = __array_rank(_Tp);
3800template <
typename _Tp>
3801 inline constexpr size_t rank_v = 0;
3802template <
typename _Tp,
size_t _Size>
3803 inline constexpr size_t rank_v<_Tp[_Size]> = 1 + rank_v<_Tp>;
3804template <
typename _Tp>
3805 inline constexpr size_t rank_v<_Tp[]> = 1 + rank_v<_Tp>;
3808template <
typename _Tp,
unsigned _Idx = 0>
3809 inline constexpr size_t extent_v = 0;
3810template <
typename _Tp,
size_t _Size>
3811 inline constexpr size_t extent_v<_Tp[_Size], 0> = _Size;
3812template <
typename _Tp,
unsigned _Idx,
size_t _Size>
3813 inline constexpr size_t extent_v<_Tp[_Size], _Idx> = extent_v<_Tp, _Idx - 1>;
3814template <
typename _Tp>
3815 inline constexpr size_t extent_v<_Tp[], 0> = 0;
3816template <
typename _Tp,
unsigned _Idx>
3817 inline constexpr size_t extent_v<_Tp[], _Idx> = extent_v<_Tp, _Idx - 1>;
3819#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_same)
3820template <
typename _Tp,
typename _Up>
3821 inline constexpr bool is_same_v = __is_same(_Tp, _Up);
3823template <
typename _Tp,
typename _Up>
3824 inline constexpr bool is_same_v =
false;
3825template <
typename _Tp>
3826 inline constexpr bool is_same_v<_Tp, _Tp> =
true;
3828template <
typename _Base,
typename _Derived>
3829 inline constexpr bool is_base_of_v = __is_base_of(_Base, _Derived);
3830#ifdef __cpp_lib_is_virtual_base_of
3831template <
typename _Base,
typename _Derived>
3832 inline constexpr bool is_virtual_base_of_v = __builtin_is_virtual_base_of(_Base, _Derived);
3834#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_convertible)
3835template <
typename _From,
typename _To>
3836 inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
3838template <
typename _From,
typename _To>
3839 inline constexpr bool is_convertible_v = is_convertible<_From, _To>::value;
3841template<
typename _Fn,
typename... _Args>
3842 inline constexpr bool is_invocable_v
3843#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_invocable)
3844 = __is_invocable(_Fn, _Args...);
3846 = is_invocable<_Fn, _Args...>::value;
3848template<
typename _Fn,
typename... _Args>
3849 inline constexpr bool is_nothrow_invocable_v
3850#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_invocable)
3851 = __is_nothrow_invocable(_Fn, _Args...);
3853 = is_nothrow_invocable<_Fn, _Args...>::value;
3855template<
typename _Ret,
typename _Fn,
typename... _Args>
3856 inline constexpr bool is_invocable_r_v
3857 = is_invocable_r<_Ret, _Fn, _Args...>::value;
3858template<
typename _Ret,
typename _Fn,
typename... _Args>
3859 inline constexpr bool is_nothrow_invocable_r_v
3860 = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value;
3864#ifdef __cpp_lib_has_unique_object_representations
3867 template<typename _Tp>
3868 struct has_unique_object_representations
3869 : bool_constant<__has_unique_object_representations(
3870 remove_cv_t<remove_all_extents_t<_Tp>>
3873 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3874 "template argument must be a complete class or an unbounded array");
3877# if __cpp_lib_type_trait_variable_templates
3879 template<typename _Tp>
3880 inline constexpr bool has_unique_object_representations_v
3881 = has_unique_object_representations<_Tp>::value;
3885#ifdef __cpp_lib_is_aggregate
3888 template<typename _Tp>
3890 : bool_constant<__is_aggregate(remove_cv_t<_Tp>)>
3893# if __cpp_lib_type_trait_variable_templates
3898 template<
typename _Tp>
3899 inline constexpr bool is_aggregate_v = __is_aggregate(remove_cv_t<_Tp>);
3903#if __cpp_impl_reflection >= 202506L \
3904 && _GLIBCXX_USE_BUILTIN_TRAIT(__builtin_is_consteval_only)
3907 template<typename _Tp>
3908 struct is_consteval_only
3909 : bool_constant<__builtin_is_consteval_only(_Tp)>
3916 template<
typename _Tp>
3917 inline constexpr bool is_consteval_only_v
3918 = __builtin_is_consteval_only(_Tp);
3925#ifdef __cpp_lib_remove_cvref
3926# if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_cvref)
3927 template<
typename _Tp>
3929 {
using type = __remove_cvref(_Tp); };
3931 template<
typename _Tp>
3933 {
using type =
typename remove_cv<_Tp>::type; };
3935 template<
typename _Tp>
3936 struct remove_cvref<_Tp&>
3937 {
using type =
typename remove_cv<_Tp>::type; };
3939 template<
typename _Tp>
3940 struct remove_cvref<_Tp&&>
3941 {
using type =
typename remove_cv<_Tp>::type; };
3944 template<
typename _Tp>
3945 using remove_cvref_t =
typename remove_cvref<_Tp>::type;
3949#ifdef __cpp_lib_type_identity
3954 template<
typename _Tp>
3955 struct type_identity {
using type = _Tp; };
3957 template<
typename _Tp>
3958 using type_identity_t =
typename type_identity<_Tp>::type;
3962#ifdef __cpp_lib_unwrap_ref
3967 template<
typename _Tp>
3968 struct unwrap_reference {
using type = _Tp; };
3970 template<
typename _Tp>
3973 template<
typename _Tp>
3974 using unwrap_reference_t =
typename unwrap_reference<_Tp>::type;
3981 template<
typename _Tp>
3982 struct unwrap_ref_decay {
using type = unwrap_reference_t<decay_t<_Tp>>; };
3984 template<
typename _Tp>
3985 using unwrap_ref_decay_t =
typename unwrap_ref_decay<_Tp>::type;
3989#ifdef __cpp_lib_bounded_array_traits
3993# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_bounded_array)
3994 template<
typename _Tp>
3995 inline constexpr bool is_bounded_array_v = __is_bounded_array(_Tp);
3997 template<
typename _Tp>
3998 inline constexpr bool is_bounded_array_v =
false;
4000 template<
typename _Tp,
size_t _Size>
4001 inline constexpr bool is_bounded_array_v<_Tp[_Size]> =
true;
4007# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_unbounded_array)
4008 template<
typename _Tp>
4009 inline constexpr bool is_unbounded_array_v = __is_unbounded_array(_Tp);
4011 template<
typename _Tp>
4012 inline constexpr bool is_unbounded_array_v =
false;
4014 template<
typename _Tp>
4015 inline constexpr bool is_unbounded_array_v<_Tp[]> =
true;
4020 template<
typename _Tp>
4021 struct is_bounded_array
4022 :
public bool_constant<is_bounded_array_v<_Tp>>
4027 template<
typename _Tp>
4028 struct is_unbounded_array
4029 :
public bool_constant<is_unbounded_array_v<_Tp>>
4033#if __has_builtin(__is_layout_compatible) && __cplusplus >= 202002L
4036 template<
typename _Tp,
typename _Up>
4038 : bool_constant<__is_layout_compatible(_Tp, _Up)>
4043 template<
typename _Tp,
typename _Up>
4045 = __is_layout_compatible(_Tp, _Up);
4047#if __has_builtin(__builtin_is_corresponding_member)
4048# ifndef __cpp_lib_is_layout_compatible
4049# error "libstdc++ bug: is_corresponding_member and is_layout_compatible are provided but their FTM is not set"
4053 template<
typename _S1,
typename _S2,
typename _M1,
typename _M2>
4056 {
return __builtin_is_corresponding_member(__m1, __m2); }
4060#if __has_builtin(__is_pointer_interconvertible_base_of) \
4061 && __cplusplus >= 202002L
4064 template<
typename _Base,
typename _Derived>
4066 : bool_constant<__is_pointer_interconvertible_base_of(_Base, _Derived)>
4071 template<
typename _Base,
typename _Derived>
4073 = __is_pointer_interconvertible_base_of(_Base, _Derived);
4075#if __has_builtin(__builtin_is_pointer_interconvertible_with_class)
4076# ifndef __cpp_lib_is_pointer_interconvertible
4077# error "libstdc++ bug: is_pointer_interconvertible available but FTM is not set"
4083 template<
typename _Tp,
typename _Mem>
4086 {
return __builtin_is_pointer_interconvertible_with_class(__mp); }
4090#ifdef __cpp_lib_is_scoped_enum
4094# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_scoped_enum)
4095 template<
typename _Tp>
4096 struct is_scoped_enum
4097 : bool_constant<__is_scoped_enum(_Tp)>
4100 template<
typename _Tp>
4101 struct is_scoped_enum
4105 template<
typename _Tp>
4106 requires __is_enum(_Tp)
4107 &&
requires(remove_cv_t<_Tp> __t) { __t = __t; }
4108 struct is_scoped_enum<_Tp>
4109 : bool_constant<!requires(_Tp __t, void(*__f)(int)) { __f(__t); }>
4115# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_scoped_enum)
4116 template<
typename _Tp>
4117 inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp);
4119 template<
typename _Tp>
4120 inline constexpr bool is_scoped_enum_v = is_scoped_enum<_Tp>::value;
4124#ifdef __cpp_lib_is_implicit_lifetime
4128 template<
typename _Tp>
4129 struct is_implicit_lifetime
4130 : bool_constant<__builtin_is_implicit_lifetime(_Tp)>
4135 template<
typename _Tp>
4136 inline constexpr bool is_implicit_lifetime_v
4137 = __builtin_is_implicit_lifetime(_Tp);
4140#ifdef __cpp_lib_reference_from_temporary
4145 template<typename _Tp, typename _Up>
4146 struct reference_constructs_from_temporary
4147 :
public bool_constant<__reference_constructs_from_temporary(_Tp, _Up)>
4149 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{})
4150 && std::__is_complete_or_unbounded(__type_identity<_Up>{}),
4151 "template argument must be a complete class or an unbounded array");
4158 template<
typename _Tp,
typename _Up>
4159 struct reference_converts_from_temporary
4160 :
public bool_constant<__reference_converts_from_temporary(_Tp, _Up)>
4162 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{})
4163 && std::__is_complete_or_unbounded(__type_identity<_Up>{}),
4164 "template argument must be a complete class or an unbounded array");
4169 template<
typename _Tp,
typename _Up>
4170 inline constexpr bool reference_constructs_from_temporary_v
4171 = reference_constructs_from_temporary<_Tp, _Up>::value;
4175 template<
typename _Tp,
typename _Up>
4176 inline constexpr bool reference_converts_from_temporary_v
4177 = reference_converts_from_temporary<_Tp, _Up>::value;
4180#ifdef __cpp_lib_is_constant_evaluated
4183 [[__gnu__::__always_inline__]]
4185 is_constant_evaluated() noexcept
4187#if __cpp_if_consteval >= 202106L
4188 if consteval {
return true; }
else {
return false; }
4190 return __builtin_is_constant_evaluated();
4195#if __cplusplus >= 202002L
4197 template<
typename _From,
typename _To>
4198 using __copy_cv =
typename __match_cv_qualifiers<_From, _To>::__type;
4200 template<
typename _Xp,
typename _Yp>
4204 template<
typename _Ap,
typename _Bp,
typename =
void>
4205 struct __common_ref_impl
4209 template<
typename _Ap,
typename _Bp>
4210 using __common_ref =
typename __common_ref_impl<_Ap, _Bp>::type;
4213 template<
typename _Xp,
typename _Yp>
4214 using __condres_cvref
4215 = __cond_res<__copy_cv<_Xp, _Yp>&, __copy_cv<_Yp, _Xp>&>;
4218 template<
typename _Xp,
typename _Yp>
4219 struct __common_ref_impl<_Xp&, _Yp&, __void_t<__condres_cvref<_Xp, _Yp>>>
4221 __condres_cvref<_Xp, _Yp>>
4225 template<
typename _Xp,
typename _Yp>
4229 template<
typename _Xp,
typename _Yp>
4230 struct __common_ref_impl<_Xp&&, _Yp&&,
4231 _Require<is_convertible<_Xp&&, __common_ref_C<_Xp, _Yp>>,
4232 is_convertible<_Yp&&, __common_ref_C<_Xp, _Yp>>>>
4233 {
using type = __common_ref_C<_Xp, _Yp>; };
4236 template<
typename _Xp,
typename _Yp>
4237 using __common_ref_D = __common_ref<const _Xp&, _Yp&>;
4240 template<
typename _Xp,
typename _Yp>
4241 struct __common_ref_impl<_Xp&&, _Yp&,
4242 _Require<is_convertible<_Xp&&, __common_ref_D<_Xp, _Yp>>>>
4243 {
using type = __common_ref_D<_Xp, _Yp>; };
4246 template<
typename _Xp,
typename _Yp>
4247 struct __common_ref_impl<_Xp&, _Yp&&>
4248 : __common_ref_impl<_Yp&&, _Xp&>
4252 template<
typename _Tp,
typename _Up,
4253 template<
typename>
class _TQual,
template<
typename>
class _UQual>
4254 struct basic_common_reference
4258 template<
typename _Tp>
4260 {
template<
typename _Up>
using __type = __copy_cv<_Tp, _Up>; };
4262 template<
typename _Tp>
4264 {
template<
typename _Up>
using __type = __copy_cv<_Tp, _Up>&; };
4266 template<
typename _Tp>
4267 struct __xref<_Tp&&>
4268 {
template<
typename _Up>
using __type = __copy_cv<_Tp, _Up>&&; };
4270 template<
typename _Tp1,
typename _Tp2>
4271 using __basic_common_ref
4272 =
typename basic_common_reference<remove_cvref_t<_Tp1>,
4273 remove_cvref_t<_Tp2>,
4274 __xref<_Tp1>::template __type,
4275 __xref<_Tp2>::template __type>::type;
4278 template<
typename... _Tp>
4279 struct common_reference;
4281 template<
typename... _Tp>
4286 struct common_reference<>
4290 template<
typename _Tp0>
4291 struct common_reference<_Tp0>
4292 {
using type = _Tp0; };
4295 template<
typename _Tp1,
typename _Tp2,
int _Bullet = 1>
4296 struct __common_reference_impl
4297 : __common_reference_impl<_Tp1, _Tp2, _Bullet + 1>
4301 template<
typename _Tp1,
typename _Tp2>
4302 struct common_reference<_Tp1, _Tp2>
4303 : __common_reference_impl<_Tp1, _Tp2>
4307 template<
typename _Tp1,
typename _Tp2>
4308 requires is_reference_v<_Tp1> && is_reference_v<_Tp2>
4309 &&
requires {
typename __common_ref<_Tp1, _Tp2>; }
4310#if __cpp_lib_common_reference
4311 && is_convertible_v<add_pointer_t<_Tp1>,
4313 && is_convertible_v<add_pointer_t<_Tp2>,
4316 struct __common_reference_impl<_Tp1, _Tp2, 1>
4317 {
using type = __common_ref<_Tp1, _Tp2>; };
4320 template<
typename _Tp1,
typename _Tp2>
4321 requires requires {
typename __basic_common_ref<_Tp1, _Tp2>; }
4322 struct __common_reference_impl<_Tp1, _Tp2, 2>
4323 {
using type = __basic_common_ref<_Tp1, _Tp2>; };
4326 template<
typename _Tp1,
typename _Tp2>
4327 requires requires {
typename __cond_res<_Tp1, _Tp2>; }
4328 struct __common_reference_impl<_Tp1, _Tp2, 3>
4329 {
using type = __cond_res<_Tp1, _Tp2>; };
4332 template<
typename _Tp1,
typename _Tp2>
4334 struct __common_reference_impl<_Tp1, _Tp2, 4>
4335 {
using type = common_type_t<_Tp1, _Tp2>; };
4338 template<
typename _Tp1,
typename _Tp2>
4339 struct __common_reference_impl<_Tp1, _Tp2, 5>
4343 template<
typename _Tp1,
typename _Tp2,
typename... _Rest>
4344 struct common_reference<_Tp1, _Tp2, _Rest...>
4345 : __common_type_fold<common_reference<_Tp1, _Tp2>,
4346 __common_type_pack<_Rest...>>
4350 template<
typename _Tp1,
typename _Tp2,
typename... _Rest>
4351 struct __common_type_fold<common_reference<_Tp1, _Tp2>,
4352 __common_type_pack<_Rest...>,
4354 :
public common_reference<common_reference_t<_Tp1, _Tp2>, _Rest...>
4360#if __cplusplus >= 201103L
4363 template<
size_t... _Indexes>
struct _Index_tuple { };
4366 template<
size_t _Num>
4367 struct _Build_index_tuple
4369#if __has_builtin(__make_integer_seq)
4370 template<
typename,
size_t... _Indices>
4371 using _IdxTuple = _Index_tuple<_Indices...>;
4374 using __type = __make_integer_seq<_IdxTuple, size_t, _Num>;
4377 using __type = _Index_tuple<__integer_pack(_Num)...>;
4382#ifdef __cpp_lib_constant_wrapper
4383 template<
typename _Tp>
4384 struct _CwFixedValue
4389 _CwFixedValue(__type __v) noexcept
4395 template<
typename _Tp,
size_t _Extent>
4396 struct _CwFixedValue<_Tp[_Extent]>
4398 using __type = _Tp[_Extent];
4401 _CwFixedValue(_Tp (&__arr)[_Extent]) noexcept
4402 : _CwFixedValue(__arr,
typename _Build_index_tuple<_Extent>::__type())
4405 template<
size_t... _Indices>
4407 _CwFixedValue(_Tp (&__arr)[_Extent], _Index_tuple<_Indices...>) noexcept
4408 : _M_data{__arr[_Indices]...}
4411 _Tp _M_data[_Extent];
4414 template<
typename _Tp,
size_t _Extent>
4415 _CwFixedValue(_Tp (&)[_Extent]) -> _CwFixedValue<_Tp[_Extent]>;
4417 template<_CwFixedValue _Xv,
4418 typename =
typename decltype(_CwFixedValue(_Xv))::__type>
4419 struct constant_wrapper;
4421 template<
typename _Tp>
4422 concept _ConstExprParam =
requires
4424 typename constant_wrapper<_Tp::value>;
4429 template<_ConstExprParam _Tp>
4430 friend constexpr auto
4431 operator+(_Tp)
noexcept -> constant_wrapper<(+_Tp::value)>
4434 template<_ConstExprParam _Tp>
4435 friend constexpr auto
4436 operator-(_Tp)
noexcept -> constant_wrapper<(-_Tp::value)>
4439 template<_ConstExprParam _Tp>
4440 friend constexpr auto
4441 operator~(_Tp)
noexcept -> constant_wrapper<(~_Tp::value)>
4444 template<_ConstExprParam _Tp>
4445 friend constexpr auto
4446 operator!(_Tp)
noexcept -> constant_wrapper<(!_Tp::value)>
4449 template<_ConstExprParam _Tp>
4450 friend constexpr auto
4451 operator&(_Tp)
noexcept -> constant_wrapper<(&_Tp::value)>
4454 template<_ConstExprParam _Tp>
4455 friend constexpr auto
4456 operator*(_Tp)
noexcept -> constant_wrapper<(*_Tp::value)>
4459 template<_ConstExprParam _Left, _ConstExprParam _Right>
4460 friend constexpr auto
4462 -> constant_wrapper<(_Left::value + _Right::value)>
4465 template<_ConstExprParam _Left, _ConstExprParam _Right>
4466 friend constexpr auto
4468 -> constant_wrapper<(_Left::value - _Right::value)>
4471 template<_ConstExprParam _Left, _ConstExprParam _Right>
4472 friend constexpr auto
4474 -> constant_wrapper<(_Left::value * _Right::value)>
4477 template<_ConstExprParam _Left, _ConstExprParam _Right>
4478 friend constexpr auto
4480 -> constant_wrapper<(_Left::value / _Right::value)>
4483 template<_ConstExprParam _Left, _ConstExprParam _Right>
4484 friend constexpr auto
4485 operator%(_Left, _Right)
noexcept
4486 -> constant_wrapper<(_Left::value % _Right::value)>
4489 template<_ConstExprParam _Left, _ConstExprParam _Right>
4490 friend constexpr auto
4492 -> constant_wrapper<(_Left::value << _Right::value)>
4495 template<_ConstExprParam _Left, _ConstExprParam _Right>
4496 friend constexpr auto
4498 -> constant_wrapper<(_Left::value >> _Right::value)>
4501 template<_ConstExprParam _Left, _ConstExprParam _Right>
4502 friend constexpr auto
4504 -> constant_wrapper<(_Left::value & _Right::value)>
4507 template<_ConstExprParam _Left, _ConstExprParam _Right>
4508 friend constexpr auto
4510 -> constant_wrapper<(_Left::value | _Right::value)>
4513 template<_ConstExprParam _Left, _ConstExprParam _Right>
4514 friend constexpr auto
4516 -> constant_wrapper<(_Left::value ^ _Right::value)>
4519 template<_ConstExprParam _Left, _ConstExprParam _Right>
4520 requires (!is_constructible_v<bool,
decltype(_Left::value)>
4521 || !is_constructible_v<bool,
decltype(_Right::value)>)
4522 friend constexpr auto
4523 operator&&(_Left, _Right)
noexcept
4524 -> constant_wrapper<(_Left::value && _Right::value)>
4527 template<_ConstExprParam _Left, _ConstExprParam _Right>
4528 requires (!is_constructible_v<bool,
decltype(_Left::value)>
4529 || !is_constructible_v<bool,
decltype(_Right::value)>)
4530 friend constexpr auto
4531 operator||(_Left, _Right)
noexcept
4532 -> constant_wrapper<(_Left::value || _Right::value)>
4535 template<_ConstExprParam _Left, _ConstExprParam _Right>
4536 friend constexpr auto
4537 operator<=>(_Left, _Right)
noexcept
4538 -> constant_wrapper<(_Left::value <=> _Right::value)>
4541 template<_ConstExprParam _Left, _ConstExprParam _Right>
4542 friend constexpr auto
4543 operator<(_Left, _Right)
noexcept
4544 -> constant_wrapper<(_Left::value < _Right::value)>
4547 template<_ConstExprParam _Left, _ConstExprParam _Right>
4548 friend constexpr auto
4549 operator<=(_Left, _Right)
noexcept
4550 -> constant_wrapper<(_Left::value <= _Right::value)>
4553 template<_ConstExprParam _Left, _ConstExprParam _Right>
4554 friend constexpr auto
4555 operator==(_Left, _Right)
noexcept
4556 -> constant_wrapper<(_Left::value == _Right::value)>
4559 template<_ConstExprParam _Left, _ConstExprParam _Right>
4560 friend constexpr auto
4561 operator!=(_Left, _Right)
noexcept
4562 -> constant_wrapper<(_Left::value != _Right::value)>
4565 template<_ConstExprParam _Left, _ConstExprParam _Right>
4566 friend constexpr auto
4567 operator>(_Left, _Right)
noexcept
4568 -> constant_wrapper<(_Left::value > _Right::value)>
4571 template<_ConstExprParam _Left, _ConstExprParam _Right>
4572 friend constexpr auto
4573 operator>=(_Left, _Right)
noexcept
4574 -> constant_wrapper<(_Left::value >= _Right::value)>
4577 template<_ConstExprParam _Left, _ConstExprParam _Right>
4578 friend constexpr auto
4579 operator,(_Left, _Right)
noexcept =
delete;
4581 template<_ConstExprParam _Left, _ConstExprParam _Right>
4582 friend constexpr auto
4583 operator->*(_Left, _Right)
noexcept
4584 -> constant_wrapper<_Left::value->*(_Right::value)>
4587 template<_ConstExprParam _Tp, _ConstExprParam... _Args>
4589 operator()(
this _Tp, _Args...) noexcept
4591 requires(_Args...) { constant_wrapper<_Tp::value(_Args::value...)>(); }
4592 {
return constant_wrapper<_Tp::value(_Args::value...)>{}; }
4594 template<_ConstExprParam _Tp, _ConstExprParam... _Args>
4596 operator[](
this _Tp, _Args...) noexcept
4597 -> constant_wrapper<(_Tp::value[_Args::value...])>
4600 template<_ConstExprParam _Tp>
4602 operator++(
this _Tp)
noexcept
4603 requires requires(_Tp::value_type __x) { ++__x; }
4605 return constant_wrapper<
4606 [] {
auto __x = _Tp::value;
return ++__x; }()>{};
4609 template<_ConstExprParam _Tp>
4611 operator++(
this _Tp,
int)
noexcept
4612 requires requires(_Tp::value_type __x) { __x++; }
4614 return constant_wrapper<
4615 [] {
auto __x = _Tp::value;
return __x++; }()>{};
4618 template<_ConstExprParam _Tp>
4620 operator--(
this _Tp)
noexcept
4621 requires requires(_Tp::value_type __x) { --__x; }
4623 return constant_wrapper<
4624 [] {
auto __x = _Tp::value;
return --__x; }()>{};
4627 template<_ConstExprParam _Tp>
4629 operator--(
this _Tp,
int)
noexcept
4630 requires requires(_Tp::value_type __x) { __x--; }
4632 return constant_wrapper<
4633 [] {
auto __x = _Tp::value;
return __x--; }()>{};
4636 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4638 operator+=(
this _Tp, _Right)
noexcept
4639 requires requires(_Tp::value_type __x) { __x += _Right::value; }
4641 return constant_wrapper<
4642 [] {
auto __x = _Tp::value;
return __x += _Right::value; }()>{};
4645 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4647 operator-=(
this _Tp, _Right)
noexcept
4648 requires requires(_Tp::value_type __x) { __x -= _Right::value; }
4650 return constant_wrapper<
4651 [] {
auto __x = _Tp::value;
return __x -= _Right::value; }()>{};
4654 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4656 operator*=(
this _Tp, _Right)
noexcept
4657 requires requires(_Tp::value_type __x) { __x *= _Right::value; }
4659 return constant_wrapper<
4660 [] {
auto __x = _Tp::value;
return __x *= _Right::value; }()>{};
4663 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4665 operator/=(
this _Tp, _Right)
noexcept
4666 requires requires(_Tp::value_type __x) { __x /= _Right::value; }
4668 return constant_wrapper<
4669 [] {
auto __x = _Tp::value;
return __x /= _Right::value; }()>{};
4672 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4674 operator%=(
this _Tp, _Right)
noexcept
4675 requires requires(_Tp::value_type __x) { __x %= _Right::value; }
4677 return constant_wrapper<
4678 [] {
auto __x = _Tp::value;
return __x %= _Right::value; }()>{};
4681 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4683 operator&=(
this _Tp, _Right)
noexcept
4684 requires requires(_Tp::value_type __x) { __x &= _Right::value; }
4686 return constant_wrapper<
4687 [] {
auto __x = _Tp::value;
return __x &= _Right::value; }()>{};
4690 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4692 operator|=(
this _Tp, _Right)
noexcept
4693 requires requires(_Tp::value_type __x) { __x |= _Right::value; }
4695 return constant_wrapper<
4696 [] {
auto __x = _Tp::value;
return __x |= _Right::value; }()>{};
4699 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4701 operator^=(
this _Tp, _Right)
noexcept
4702 requires requires(_Tp::value_type __x) { __x ^= _Right::value; }
4704 return constant_wrapper<
4705 [] {
auto __x = _Tp::value;
return __x ^= _Right::value; }()>{};
4708 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4710 operator<<=(
this _Tp, _Right)
noexcept
4711 requires requires(_Tp::value_type __x) { __x <<= _Right::value; }
4713 return constant_wrapper<
4714 [] {
auto __x = _Tp::value;
return __x <<= _Right::value; }()>{};
4717 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4719 operator>>=(
this _Tp, _Right)
noexcept
4720 requires requires(_Tp::value_type __x) { __x >>= _Right::value; }
4722 return constant_wrapper<
4723 [] {
auto __x = _Tp::value;
return __x >>= _Right::value; }()>{};
4727 template<_CwFixedValue _Xv,
typename>
4728 struct constant_wrapper : _CwOperators
4730 static constexpr const auto& value = _Xv._M_data;
4731 using type = constant_wrapper;
4732 using value_type =
typename decltype(_Xv)::__type;
4734 template<_ConstExprParam _Right>
4736 operator=(_Right)
const noexcept
4737 requires requires(value_type __x) { __x = _Right::value; }
4739 return constant_wrapper<
4740 [] {
auto __x = value;
return __x = _Right::value; }()>{};
4744 operator decltype(value)()
const noexcept
4748 template<_CwFixedValue _Tp>
4749 constexpr auto cw = constant_wrapper<_Tp>{};
4754_GLIBCXX_END_NAMESPACE_VERSION
constexpr complex< _Tp > operator*(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x times y.
constexpr complex< _Tp > operator-(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x minus y.
constexpr complex< _Tp > operator+(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x plus y.
constexpr complex< _Tp > operator/(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x divided by y.
static const size_t alignment_value
The value of the strictest alignment of _Types.
constexpr bool is_corresponding_member(_M1 _S1::*__m1, _M2 _S2::*__m2) noexcept
typename common_reference< _Tp... >::type common_reference_t
typename result_of< _Tp >::type result_of_t
Alias template for result_of.
typename aligned_storage< _S_len, alignment_value >::type type
The storage.
__bool_constant< true > true_type
The type used as a compile-time boolean with true value.
typename remove_extent< _Tp >::type remove_extent_t
Alias template for remove_extent.
typename conditional< _Cond, _Iftrue, _Iffalse >::type conditional_t
Alias template for conditional.
typename underlying_type< _Tp >::type underlying_type_t
Alias template for underlying_type.
typename make_signed< _Tp >::type make_signed_t
Alias template for make_signed.
typename add_lvalue_reference< _Tp >::type add_lvalue_reference_t
Alias template for add_lvalue_reference.
typename aligned_storage< _Len, _Align >::type aligned_storage_t
Alias template for aligned_storage.
typename remove_reference< _Tp >::type remove_reference_t
Alias template for remove_reference.
typename common_type< _Tp... >::type common_type_t
Alias template for common_type.
typename add_pointer< _Tp >::type add_pointer_t
Alias template for add_pointer.
typename make_unsigned< _Tp >::type make_unsigned_t
Alias template for make_unsigned.
constexpr bool is_pointer_interconvertible_with_class(_Mem _Tp::*__mp) noexcept
True if __mp points to the first member of a standard-layout type.
typename enable_if< _Cond, _Tp >::type enable_if_t
Alias template for enable_if.
typename remove_all_extents< _Tp >::type remove_all_extents_t
Alias template for remove_all_extents.
typename remove_pointer< _Tp >::type remove_pointer_t
Alias template for remove_pointer.
typename add_rvalue_reference< _Tp >::type add_rvalue_reference_t
Alias template for add_rvalue_reference.
__bool_constant< false > false_type
The type used as a compile-time boolean with false value.
constexpr bool is_layout_compatible_v
constexpr bool is_pointer_interconvertible_base_of_v
typename decay< _Tp >::type decay_t
Alias template for decay.
auto declval() noexcept -> decltype(__declval< _Tp >(0))
void void_t
A metafunction that always yields void, used for detecting valid types.
ISO C++ entities toplevel namespace is std.
constexpr bitset< _Nb > operator^(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.
std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, bitset< _Nb > &__x)
Global I/O operators for bitsets.
std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const bitset< _Nb > &__x)
Global I/O operators for bitsets.
constexpr bitset< _Nb > operator|(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.
constexpr bitset< _Nb > operator&(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.
Implementation details not part of the namespace std interface.
Primary class template for reference_wrapper.
Define a member typedef type only if a boolean constant is true.
is_member_function_pointer
is_nothrow_default_constructible
is_nothrow_copy_constructible
is_nothrow_move_constructible
is_nothrow_copy_assignable
is_nothrow_move_assignable
is_trivially_constructible
is_trivially_default_constructible
is_trivially_copy_constructible
is_trivially_move_constructible
is_trivially_copy_assignable
is_trivially_move_assignable
is_trivially_destructible
Provide aligned storage for types.
Define a member typedef type to one of two argument types.
The underlying type of an enum.
True if _Derived is standard-layout and has a base class of type _Base