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_structural
59#define __glibcxx_want_is_swappable
60#define __glibcxx_want_is_virtual_base_of
61#define __glibcxx_want_logical_traits
62#define __glibcxx_want_reference_from_temporary
63#define __glibcxx_want_remove_cvref
64#define __glibcxx_want_result_of_sfinae
65#define __glibcxx_want_transformation_trait_aliases
66#define __glibcxx_want_type_identity
67#define __glibcxx_want_type_trait_variable_templates
68#define __glibcxx_want_unwrap_ref
69#define __glibcxx_want_void_t
74namespace std _GLIBCXX_VISIBILITY(default)
76_GLIBCXX_BEGIN_NAMESPACE_VERSION
78 template<
typename _Tp>
95 template<
typename _Tp, _Tp __v>
98 static constexpr _Tp value = __v;
99 using value_type = _Tp;
101 constexpr operator value_type()
const noexcept {
return value; }
103#ifdef __cpp_lib_integral_constant_callable
104 constexpr value_type operator()()
const noexcept {
return value; }
108#if ! __cpp_inline_variables
109 template<
typename _Tp, _Tp __v>
110 constexpr _Tp integral_constant<_Tp, __v>::value;
125#ifdef __cpp_lib_bool_constant
129 using bool_constant = __bool_constant<__v>;
136 template<
bool,
typename _Tp =
void>
141 template<
typename _Tp>
143 {
using type = _Tp; };
146 template<
bool _Cond,
typename _Tp =
void>
147 using __enable_if_t =
typename enable_if<_Cond, _Tp>::type;
152 template<
typename _Tp,
typename>
157 struct __conditional<false>
159 template<
typename,
typename _Up>
164 template<
bool _Cond,
typename _If,
typename _Else>
165 using __conditional_t
166 =
typename __conditional<_Cond>::template type<_If, _Else>;
169 template <
typename _Type>
170 struct __type_identity
171 {
using type = _Type; };
173 template<
typename _Tp>
174 using __type_identity_t =
typename __type_identity<_Tp>::type;
179 template<
typename _Tp,
typename...>
180 using __first_t = _Tp;
183 template<
typename... _Bn>
185 __enable_if_t<!bool(_Bn::value)>...>;
187 template<
typename... _Bn>
190 template<
typename... _Bn>
191 auto __and_fn(
int) -> __first_t<
true_type,
192 __enable_if_t<bool(_Bn::value)>...>;
194 template<
typename... _Bn>
201 template<
typename... _Bn>
203 : decltype(__detail::__or_fn<_Bn...>(0))
206 template<
typename... _Bn>
208 : decltype(__detail::__and_fn<_Bn...>(0))
211 template<
typename _Pp>
213 : __bool_constant<!bool(_Pp::value)>
217#ifdef __cpp_lib_logical_traits
220 template<
typename... _Bn>
221 inline constexpr bool __or_v = __or_<_Bn...>::value;
222 template<
typename... _Bn>
223 inline constexpr bool __and_v = __and_<_Bn...>::value;
227 template<
typename ,
typename _B1,
typename... _Bn>
228 struct __disjunction_impl
229 {
using type = _B1; };
231 template<
typename _B1,
typename _B2,
typename... _Bn>
232 struct __disjunction_impl<__enable_if_t<!bool(_B1::value)>, _B1, _B2, _Bn...>
233 {
using type =
typename __disjunction_impl<void, _B2, _Bn...>::type; };
235 template<
typename ,
typename _B1,
typename... _Bn>
236 struct __conjunction_impl
237 {
using type = _B1; };
239 template<
typename _B1,
typename _B2,
typename... _Bn>
240 struct __conjunction_impl<__enable_if_t<bool(_B1::value)>, _B1, _B2, _Bn...>
241 {
using type =
typename __conjunction_impl<void, _B2, _Bn...>::type; };
245 template<
typename... _Bn>
247 : __detail::__conjunction_impl<void, _Bn...>::type
255 template<
typename... _Bn>
257 : __detail::__disjunction_impl<void, _Bn...>::type
265 template<
typename _Pp>
273 template<
typename... _Bn>
274 inline constexpr bool conjunction_v = conjunction<_Bn...>::value;
276 template<
typename... _Bn>
277 inline constexpr bool disjunction_v = disjunction<_Bn...>::value;
279 template<
typename _Pp>
280 inline constexpr bool negation_v = negation<_Pp>::value;
295 struct __is_array_unknown_bounds;
300 template<
typename _Tp>
301 using __maybe_complete_object_type
302 = __and_<is_object<_Tp>, __not_<__is_array_unknown_bounds<_Tp>>>;
308 template<
typename _Tp,
309 typename = __enable_if_t<__maybe_complete_object_type<_Tp>::value>,
310 size_t =
sizeof(_Tp)>
312 __is_complete_or_unbounded(__type_identity<_Tp>)
317 template<
typename _TypeIdentity,
318 typename _NestedType =
typename _TypeIdentity::type>
319 constexpr typename __not_<__maybe_complete_object_type<_NestedType>>::type
320 __is_complete_or_unbounded(_TypeIdentity)
324 template<
typename _Tp>
325 using __remove_cv_t =
typename remove_cv<_Tp>::type;
331 template<
typename _Tp>
340 struct is_void<const void>
341 :
public true_type { };
348 struct is_void<const volatile void>
357 enum class _Integer_kind { _None, _Signed, _Unsigned };
360 struct __is_integral_helper
362 {
static constexpr auto _S_kind = _Integer_kind::_None; };
365 struct __is_integral_helper<bool>
367 {
static constexpr auto _S_kind = _Integer_kind::_None; };
370 struct __is_integral_helper<char>
372 {
static constexpr auto _S_kind = _Integer_kind::_None; };
375 struct __is_integral_helper<signed char>
377 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
380 struct __is_integral_helper<unsigned char>
382 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
388 struct __is_integral_helper<wchar_t>
390 {
static constexpr auto _S_kind = _Integer_kind::_None; };
392#ifdef _GLIBCXX_USE_CHAR8_T
394 struct __is_integral_helper<char8_t>
396 {
static constexpr auto _S_kind = _Integer_kind::_None; };
400 struct __is_integral_helper<char16_t>
402 {
static constexpr auto _S_kind = _Integer_kind::_None; };
405 struct __is_integral_helper<char32_t>
407 {
static constexpr auto _S_kind = _Integer_kind::_None; };
410 struct __is_integral_helper<short>
412 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
415 struct __is_integral_helper<unsigned short>
417 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
420 struct __is_integral_helper<int>
422 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
425 struct __is_integral_helper<unsigned int>
427 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
430 struct __is_integral_helper<long>
432 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
435 struct __is_integral_helper<unsigned long>
437 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
440 struct __is_integral_helper<long long>
442 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
445 struct __is_integral_helper<unsigned long long>
447 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
451#if defined(__GLIBCXX_TYPE_INT_N_0)
454 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_0>
456 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
460 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_0>
462 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
464#if defined(__GLIBCXX_TYPE_INT_N_1)
467 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_1>
469 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
473 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_1>
475 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
477#if defined(__GLIBCXX_TYPE_INT_N_2)
480 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_2>
482 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
486 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_2>
488 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
490#if defined(__GLIBCXX_TYPE_INT_N_3)
493 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_3>
495 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
499 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_3>
501 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
504#if defined __SIZEOF_INT128__ && defined __STRICT_ANSI__
507 struct __is_integral_helper<__int128>
509 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
513 struct __is_integral_helper<unsigned __int128>
515 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
519 template<
typename _Tp>
520 using __is_signed_integer
521 = __bool_constant<__is_integral_helper<_Tp>::_S_kind
522 == _Integer_kind::_Signed>;
525 template<
typename _Tp>
526 using __is_unsigned_integer
527 = __bool_constant<__is_integral_helper<_Tp>::_S_kind
528 == _Integer_kind::_Unsigned>;
532 template<
typename _Tp>
533 using __is_signed_or_unsigned_integer
534 = __bool_constant<__is_integral_helper<_Tp>::_S_kind
535 != _Integer_kind::_None>;
540 template<
typename _Tp>
542 :
public __is_integral_helper<__remove_cv_t<_Tp>>::type
547 struct __is_floating_point_helper
551 struct __is_floating_point_helper<float>
552 :
public true_type { };
555 struct __is_floating_point_helper<double>
559 struct __is_floating_point_helper<long double>
562#ifdef __STDCPP_FLOAT16_T__
564 struct __is_floating_point_helper<_Float16>
568#ifdef __STDCPP_FLOAT32_T__
570 struct __is_floating_point_helper<_Float32>
574#ifdef __STDCPP_FLOAT64_T__
576 struct __is_floating_point_helper<_Float64>
580#ifdef __STDCPP_FLOAT128_T__
582 struct __is_floating_point_helper<_Float128>
586#ifdef __STDCPP_BFLOAT16_T__
588 struct __is_floating_point_helper<__gnu_cxx::__bfloat16_t>
592#ifdef _GLIBCXX_USE_FLOAT128
594 struct __is_floating_point_helper<__float128>
600 template<
typename _Tp>
602 :
public __is_floating_point_helper<__remove_cv_t<_Tp>>::type
606#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_array)
607 template<
typename _Tp>
609 :
public __bool_constant<__is_array(_Tp)>
616 template<
typename _Tp, std::
size_t _Size>
617 struct is_array<_Tp[_Size]>
618 :
public true_type { };
620 template<
typename _Tp>
626#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_pointer)
627 template<
typename _Tp>
629 :
public __bool_constant<__is_pointer(_Tp)>
632 template<
typename _Tp>
636 template<
typename _Tp>
637 struct is_pointer<_Tp*>
638 :
public true_type { };
640 template<
typename _Tp>
644 template<
typename _Tp>
648 template<
typename _Tp>
658 template<
typename _Tp>
667 template<
typename _Tp>
672#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_object_pointer)
673 template<
typename _Tp>
675 :
public __bool_constant<__is_member_object_pointer(_Tp)>
678 template<
typename _Tp>
682 struct __is_member_object_pointer_helper
685 template<
typename _Tp,
typename _Cp>
686 struct __is_member_object_pointer_helper<_Tp _Cp::*>
687 :
public __not_<is_function<_Tp>>::type { };
690 template<
typename _Tp>
692 :
public __is_member_object_pointer_helper<__remove_cv_t<_Tp>>::type
696#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_function_pointer)
698 template<
typename _Tp>
700 :
public __bool_constant<__is_member_function_pointer(_Tp)>
703 template<
typename _Tp>
707 struct __is_member_function_pointer_helper
710 template<
typename _Tp,
typename _Cp>
711 struct __is_member_function_pointer_helper<_Tp _Cp::*>
712 :
public is_function<_Tp>::type { };
715 template<
typename _Tp>
717 :
public __is_member_function_pointer_helper<__remove_cv_t<_Tp>>::type
722 template<
typename _Tp>
724 :
public __bool_constant<__is_enum(_Tp)>
728 template<
typename _Tp>
730 :
public __bool_constant<__is_union(_Tp)>
734 template<
typename _Tp>
736 :
public __bool_constant<__is_class(_Tp)>
740#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_function)
741 template<
typename _Tp>
743 :
public __bool_constant<__is_function(_Tp)>
746 template<
typename _Tp>
748 :
public __bool_constant<!is_const<const _Tp>::value> { };
750 template<
typename _Tp>
751 struct is_function<_Tp&>
752 :
public false_type { };
754 template<
typename _Tp>
759#if __cpp_impl_reflection >= 202506L
761 template<typename _Tp>
766 struct is_reflection<decltype(^^int)>
770 struct is_reflection<const decltype(^^int)>
774 struct is_reflection<volatile decltype(^^int)>
778 struct is_reflection<const volatile decltype(^^int)>
782#ifdef __cpp_lib_is_null_pointer
784 template<typename _Tp>
785 struct is_null_pointer
789 struct is_null_pointer<std::nullptr_t>
793 struct is_null_pointer<const std::nullptr_t>
797 struct is_null_pointer<volatile std::nullptr_t>
801 struct is_null_pointer<const volatile std::nullptr_t>
806 template<
typename _Tp>
807 struct __is_nullptr_t
808 :
public is_null_pointer<_Tp>
809 { } _GLIBCXX_DEPRECATED_SUGGEST(
"std::is_null_pointer");
815#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_reference)
816 template<
typename _Tp>
818 :
public __bool_constant<__is_reference(_Tp)>
821 template<
typename _Tp>
826 template<
typename _Tp>
827 struct is_reference<_Tp&>
831 template<
typename _Tp>
838 template<
typename _Tp>
840 :
public __or_<is_integral<_Tp>, is_floating_point<_Tp>>::type
844 template<
typename _Tp>
846 :
public __or_<is_arithmetic<_Tp>, is_void<_Tp>,
848#if __cpp_impl_reflection >= 202506L
855#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_object)
856 template<
typename _Tp>
858 :
public __bool_constant<__is_object(_Tp)>
861 template<
typename _Tp>
863 :
public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
869 struct is_member_pointer;
872 template<
typename _Tp>
874 :
public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
875 is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type
879 template<
typename _Tp>
881 :
public __bool_constant<!is_fundamental<_Tp>::value> { };
884#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_pointer)
885 template<
typename _Tp>
887 :
public __bool_constant<__is_member_pointer(_Tp)>
891 template<
typename _Tp>
892 struct __is_member_pointer_helper
895 template<
typename _Tp,
typename _Cp>
896 struct __is_member_pointer_helper<_Tp _Cp::*>
897 :
public true_type { };
900 template<
typename _Tp>
902 :
public __is_member_pointer_helper<__remove_cv_t<_Tp>>::type
906 template<
typename,
typename>
910 template<
typename _Tp,
typename... _Types>
911 using __is_one_of = __or_<is_same<_Tp, _Types>...>;
914 template<
typename...>
using __void_t = void;
920#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_const)
921 template<
typename _Tp>
923 :
public __bool_constant<__is_const(_Tp)>
930 template<
typename _Tp>
931 struct is_const<_Tp const>
932 :
public true_type { };
936#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_volatile)
937 template<
typename _Tp>
939 :
public __bool_constant<__is_volatile(_Tp)>
946 template<
typename _Tp>
947 struct is_volatile<_Tp volatile>
948 :
public true_type { };
958 template<
typename _Tp>
960 _GLIBCXX26_DEPRECATED_SUGGEST(
"is_trivially_default_constructible && is_trivially_copyable")
962 : public __bool_constant<__is_trivial(_Tp)>
964 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
965 "template argument must be a complete class or an unbounded array");
969 template<
typename _Tp>
971 :
public __bool_constant<__is_trivially_copyable(_Tp)>
973 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
974 "template argument must be a complete class or an unbounded array");
978 template<
typename _Tp>
980 :
public __bool_constant<__is_standard_layout(_Tp)>
982 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
983 "template argument must be a complete class or an unbounded array");
991 template<
typename _Tp>
993 _GLIBCXX20_DEPRECATED_SUGGEST(
"is_standard_layout && is_trivial")
995 : public __bool_constant<__is_pod(_Tp)>
997 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
998 "template argument must be a complete class or an unbounded array");
1005 template<
typename _Tp>
1007 _GLIBCXX17_DEPRECATED
1009 :
public __bool_constant<__is_literal_type(_Tp)>
1011 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1012 "template argument must be a complete class or an unbounded array");
1016 template<
typename _Tp>
1018 :
public __bool_constant<__is_empty(_Tp)>
1022 template<
typename _Tp>
1024 :
public __bool_constant<__is_polymorphic(_Tp)>
1027#ifdef __cpp_lib_is_final
1030 template<typename _Tp>
1032 :
public __bool_constant<__is_final(_Tp)>
1037 template<
typename _Tp>
1039 :
public __bool_constant<__is_abstract(_Tp)>
1043 template<
typename _Tp,
1045 struct __is_signed_helper
1048 template<
typename _Tp>
1049 struct __is_signed_helper<_Tp, true>
1050 :
public __bool_constant<_Tp(-1) < _Tp(0)>
1055 template<typename _Tp>
1057 : public __is_signed_helper<_Tp>::type
1061 template<typename _Tp>
1063 : public __and_<is_arithmetic<_Tp>, __not_<is_signed<_Tp>>>::type
1067 template<typename _Tp, typename _Up = _Tp&&>
1071 template<typename _Tp>
1076 template<typename _Tp>
1077 auto declval() noexcept -> decltype(__declval<_Tp>(0));
1083 template<typename _Tp>
1084 struct __is_array_known_bounds
1088 template<
typename _Tp,
size_t _Size>
1089 struct __is_array_known_bounds<_Tp[_Size]>
1093 template<
typename _Tp>
1094 struct __is_array_unknown_bounds
1098 template<
typename _Tp>
1099 struct __is_array_unknown_bounds<_Tp[]>
1106#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_destructible)
1108 template<
typename _Tp>
1110 :
public __bool_constant<__is_destructible(_Tp)>
1120 struct __do_is_destructible_impl
1122 template<typename _Tp, typename = decltype(declval<_Tp&>().~_Tp())>
1129 template<
typename _Tp>
1130 struct __is_destructible_impl
1131 :
public __do_is_destructible_impl
1133 using type =
decltype(__test<_Tp>(0));
1136 template<
typename _Tp,
1137 bool = __or_<is_void<_Tp>,
1138 __is_array_unknown_bounds<_Tp>,
1141 struct __is_destructible_safe;
1143 template<
typename _Tp>
1144 struct __is_destructible_safe<_Tp, false, false>
1145 :
public __is_destructible_impl<typename
1146 remove_all_extents<_Tp>::type>::type
1149 template<
typename _Tp>
1150 struct __is_destructible_safe<_Tp, true, false>
1153 template<
typename _Tp>
1154 struct __is_destructible_safe<_Tp, false, true>
1159 template<
typename _Tp>
1161 :
public __is_destructible_safe<_Tp>::type
1163 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1164 "template argument must be a complete class or an unbounded array");
1168#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_destructible)
1170 template<
typename _Tp>
1172 :
public __bool_constant<__is_nothrow_destructible(_Tp)>
1181 struct __do_is_nt_destructible_impl
1183 template<
typename _Tp>
1184 static __bool_constant<noexcept(declval<_Tp&>().~_Tp())>
1191 template<
typename _Tp>
1192 struct __is_nt_destructible_impl
1193 :
public __do_is_nt_destructible_impl
1195 using type =
decltype(__test<_Tp>(0));
1198 template<
typename _Tp,
1199 bool = __or_<is_void<_Tp>,
1200 __is_array_unknown_bounds<_Tp>,
1203 struct __is_nt_destructible_safe;
1205 template<
typename _Tp>
1206 struct __is_nt_destructible_safe<_Tp, false, false>
1207 :
public __is_nt_destructible_impl<typename
1208 remove_all_extents<_Tp>::type>::type
1211 template<
typename _Tp>
1212 struct __is_nt_destructible_safe<_Tp, true, false>
1215 template<
typename _Tp>
1216 struct __is_nt_destructible_safe<_Tp, false, true>
1221 template<
typename _Tp>
1223 :
public __is_nt_destructible_safe<_Tp>::type
1225 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1226 "template argument must be a complete class or an unbounded array");
1231 template<
typename _Tp,
typename... _Args>
1232 using __is_constructible_impl
1233 = __bool_constant<__is_constructible(_Tp, _Args...)>;
1237 template<
typename _Tp,
typename... _Args>
1239 :
public __is_constructible_impl<_Tp, _Args...>
1241 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1242 "template argument must be a complete class or an unbounded array");
1246 template<
typename _Tp>
1248 :
public __is_constructible_impl<_Tp>
1250 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1251 "template argument must be a complete class or an unbounded array");
1255#if _GLIBCXX_USE_BUILTIN_TRAIT(__add_lvalue_reference)
1256 template<
typename _Tp>
1257 using __add_lval_ref_t = __add_lvalue_reference(_Tp);
1259 template<
typename _Tp,
typename =
void>
1260 struct __add_lvalue_reference_helper
1261 {
using type = _Tp; };
1263 template<
typename _Tp>
1264 struct __add_lvalue_reference_helper<_Tp, __void_t<_Tp&>>
1265 {
using type = _Tp&; };
1267 template<
typename _Tp>
1268 using __add_lval_ref_t =
typename __add_lvalue_reference_helper<_Tp>::type;
1273 template<
typename _Tp>
1275 :
public __is_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>>
1277 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1278 "template argument must be a complete class or an unbounded array");
1282#if _GLIBCXX_USE_BUILTIN_TRAIT(__add_rvalue_reference)
1283 template<
typename _Tp>
1284 using __add_rval_ref_t = __add_rvalue_reference(_Tp);
1286 template<
typename _Tp,
typename =
void>
1287 struct __add_rvalue_reference_helper
1288 {
using type = _Tp; };
1290 template<
typename _Tp>
1291 struct __add_rvalue_reference_helper<_Tp, __void_t<_Tp&&>>
1292 {
using type = _Tp&&; };
1294 template<
typename _Tp>
1295 using __add_rval_ref_t =
typename __add_rvalue_reference_helper<_Tp>::type;
1300 template<
typename _Tp>
1302 :
public __is_constructible_impl<_Tp, __add_rval_ref_t<_Tp>>
1304 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1305 "template argument must be a complete class or an unbounded array");
1309 template<
typename _Tp,
typename... _Args>
1310 using __is_nothrow_constructible_impl
1311 = __bool_constant<__is_nothrow_constructible(_Tp, _Args...)>;
1315 template<
typename _Tp,
typename... _Args>
1317 :
public __is_nothrow_constructible_impl<_Tp, _Args...>
1319 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1320 "template argument must be a complete class or an unbounded array");
1324 template<
typename _Tp>
1326 :
public __is_nothrow_constructible_impl<_Tp>
1328 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1329 "template argument must be a complete class or an unbounded array");
1333 template<
typename _Tp>
1335 :
public __is_nothrow_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>>
1337 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1338 "template argument must be a complete class or an unbounded array");
1342 template<
typename _Tp>
1344 :
public __is_nothrow_constructible_impl<_Tp, __add_rval_ref_t<_Tp>>
1346 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1347 "template argument must be a complete class or an unbounded array");
1351 template<
typename _Tp,
typename _Up>
1352 using __is_assignable_impl = __bool_constant<__is_assignable(_Tp, _Up)>;
1356 template<
typename _Tp,
typename _Up>
1358 :
public __is_assignable_impl<_Tp, _Up>
1360 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1361 "template argument must be a complete class or an unbounded array");
1365 template<
typename _Tp>
1367 :
public __is_assignable_impl<__add_lval_ref_t<_Tp>,
1368 __add_lval_ref_t<const _Tp>>
1370 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1371 "template argument must be a complete class or an unbounded array");
1375 template<
typename _Tp>
1377 :
public __is_assignable_impl<__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>>
1379 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1380 "template argument must be a complete class or an unbounded array");
1384 template<
typename _Tp,
typename _Up>
1385 using __is_nothrow_assignable_impl
1386 = __bool_constant<__is_nothrow_assignable(_Tp, _Up)>;
1390 template<
typename _Tp,
typename _Up>
1392 :
public __is_nothrow_assignable_impl<_Tp, _Up>
1394 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1395 "template argument must be a complete class or an unbounded array");
1399 template<
typename _Tp>
1401 :
public __is_nothrow_assignable_impl<__add_lval_ref_t<_Tp>,
1402 __add_lval_ref_t<const _Tp>>
1404 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1405 "template argument must be a complete class or an unbounded array");
1409 template<
typename _Tp>
1411 :
public __is_nothrow_assignable_impl<__add_lval_ref_t<_Tp>,
1412 __add_rval_ref_t<_Tp>>
1414 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1415 "template argument must be a complete class or an unbounded array");
1419 template<
typename _Tp,
typename... _Args>
1420 using __is_trivially_constructible_impl
1421 = __bool_constant<__is_trivially_constructible(_Tp, _Args...)>;
1425 template<
typename _Tp,
typename... _Args>
1427 :
public __is_trivially_constructible_impl<_Tp, _Args...>
1429 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1430 "template argument must be a complete class or an unbounded array");
1434 template<
typename _Tp>
1436 :
public __is_trivially_constructible_impl<_Tp>
1438 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1439 "template argument must be a complete class or an unbounded array");
1442#if __cpp_variable_templates && __cpp_concepts
1443 template<
typename _Tp>
1444 constexpr bool __is_implicitly_default_constructible_v
1445 =
requires (void(&__f)(_Tp)) { __f({}); };
1447 template<
typename _Tp>
1448 struct __is_implicitly_default_constructible
1449 : __bool_constant<__is_implicitly_default_constructible_v<_Tp>>
1452 struct __do_is_implicitly_default_constructible_impl
1454 template <
typename _Tp>
1455 static void __helper(
const _Tp&);
1457 template <
typename _Tp>
1459 decltype(__helper<const _Tp&>({}))* = 0);
1464 template<
typename _Tp>
1465 struct __is_implicitly_default_constructible_impl
1466 :
public __do_is_implicitly_default_constructible_impl
1471 template<
typename _Tp>
1472 struct __is_implicitly_default_constructible_safe
1473 :
public __is_implicitly_default_constructible_impl<_Tp>::type
1476 template <
typename _Tp>
1477 struct __is_implicitly_default_constructible
1478 :
public __and_<__is_constructible_impl<_Tp>,
1479 __is_implicitly_default_constructible_safe<_Tp>>::type
1484 template<
typename _Tp>
1486 :
public __is_trivially_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>>
1488 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1489 "template argument must be a complete class or an unbounded array");
1493 template<
typename _Tp>
1495 :
public __is_trivially_constructible_impl<_Tp, __add_rval_ref_t<_Tp>>
1497 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1498 "template argument must be a complete class or an unbounded array");
1502 template<
typename _Tp,
typename _Up>
1503 using __is_trivially_assignable_impl
1504 = __bool_constant<__is_trivially_assignable(_Tp, _Up)>;
1508 template<
typename _Tp,
typename _Up>
1510 :
public __is_trivially_assignable_impl<_Tp, _Up>
1512 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1513 "template argument must be a complete class or an unbounded array");
1517 template<
typename _Tp>
1519 :
public __is_trivially_assignable_impl<__add_lval_ref_t<_Tp>,
1520 __add_lval_ref_t<const _Tp>>
1522 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1523 "template argument must be a complete class or an unbounded array");
1527 template<
typename _Tp>
1529 :
public __is_trivially_assignable_impl<__add_lval_ref_t<_Tp>,
1530 __add_rval_ref_t<_Tp>>
1532 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1533 "template argument must be a complete class or an unbounded array");
1536#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_trivially_destructible)
1538 template<
typename _Tp>
1540 :
public __bool_constant<__is_trivially_destructible(_Tp)>
1544 template<
typename _Tp>
1546 :
public __and_<__is_destructible_safe<_Tp>,
1547 __bool_constant<__has_trivial_destructor(_Tp)>>::type
1549 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1550 "template argument must be a complete class or an unbounded array");
1555 template<
typename _Tp>
1557 :
public __bool_constant<__has_virtual_destructor(_Tp)>
1559 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1560 "template argument must be a complete class or an unbounded array");
1567 template<
typename _Tp>
1571 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1572 "template argument must be a complete class or an unbounded array");
1576#if _GLIBCXX_USE_BUILTIN_TRAIT(__array_rank) \
1577 && (!defined(__clang__) || __clang_major__ >= 20)
1578 template<
typename _Tp>
1586 template<
typename _Tp, std::
size_t _Size>
1587 struct rank<_Tp[_Size]>
1588 :
public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
1590 template<
typename _Tp>
1596 template<
typename,
unsigned _U
int = 0>
1600 template<
typename _Tp,
size_t _Size>
1601 struct extent<_Tp[_Size], 0>
1604 template<
typename _Tp,
unsigned _U
int,
size_t _Size>
1605 struct extent<_Tp[_Size], _Uint>
1606 :
public extent<_Tp, _Uint - 1>::type { };
1608 template<
typename _Tp>
1612 template<
typename _Tp,
unsigned _U
int>
1613 struct extent<_Tp[], _Uint>
1614 :
public extent<_Tp, _Uint - 1>::type { };
1620#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_same)
1621 template<
typename _Tp,
typename _Up>
1623 :
public __bool_constant<__is_same(_Tp, _Up)>
1626 template<
typename _Tp,
typename _Up>
1631 template<
typename _Tp>
1632 struct is_same<_Tp, _Tp>
1638 template<
typename _Base,
typename _Derived>
1640 :
public __bool_constant<__is_base_of(_Base, _Derived)>
1643#ifdef __cpp_lib_is_virtual_base_of
1646 template<typename _Base, typename _Derived>
1647 struct is_virtual_base_of
1648 :
public bool_constant<__builtin_is_virtual_base_of(_Base, _Derived)>
1652#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_convertible)
1653 template<
typename _From,
typename _To>
1654 struct is_convertible
1655 :
public __bool_constant<__is_convertible(_From, _To)>
1658 template<
typename _From,
typename _To,
1661 struct __is_convertible_helper
1663 using type =
typename is_void<_To>::type;
1666#pragma GCC diagnostic push
1667#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
1668 template<
typename _From,
typename _To>
1669 class __is_convertible_helper<_From, _To, false>
1671 template<
typename _To1>
1672 static void __test_aux(_To1)
noexcept;
1674 template<
typename _From1,
typename _To1,
1679 template<
typename,
typename>
1684 using type =
decltype(__test<_From, _To>(0));
1686#pragma GCC diagnostic pop
1689 template<
typename _From,
typename _To>
1690 struct is_convertible
1691 :
public __is_convertible_helper<_From, _To>::type
1696 template<
typename _ToElementType,
typename _FromElementType>
1697 using __is_array_convertible
1698 = is_convertible<_FromElementType(*)[], _ToElementType(*)[]>;
1700#ifdef __cpp_lib_is_nothrow_convertible
1702#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_convertible)
1704 template<
typename _From,
typename _To>
1705 inline constexpr bool is_nothrow_convertible_v
1706 = __is_nothrow_convertible(_From, _To);
1709 template<
typename _From,
typename _To>
1710 struct is_nothrow_convertible
1711 :
public bool_constant<is_nothrow_convertible_v<_From, _To>>
1714 template<
typename _From,
typename _To,
1717 struct __is_nt_convertible_helper
1721#pragma GCC diagnostic push
1722#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
1723 template<
typename _From,
typename _To>
1724 class __is_nt_convertible_helper<_From, _To, false>
1726 template<
typename _To1>
1727 static void __test_aux(_To1)
noexcept;
1729 template<
typename _From1,
typename _To1>
1734 template<
typename,
typename>
1739 using type =
decltype(__test<_From, _To>(0));
1741#pragma GCC diagnostic pop
1744 template<
typename _From,
typename _To>
1745 struct is_nothrow_convertible
1746 :
public __is_nt_convertible_helper<_From, _To>::type
1750 template<
typename _From,
typename _To>
1751 inline constexpr bool is_nothrow_convertible_v
1752 = is_nothrow_convertible<_From, _To>::value;
1756#pragma GCC diagnostic push
1757#pragma GCC diagnostic ignored "-Wc++14-extensions"
1758 template<
typename _Tp,
typename... _Args>
1759 struct __is_nothrow_new_constructible_impl
1761 noexcept(::new(std::declval<void*>()) _Tp(std::declval<_Args>()...))
1765 template<
typename _Tp,
typename... _Args>
1766 _GLIBCXX17_INLINE
constexpr bool __is_nothrow_new_constructible
1768 __is_nothrow_new_constructible_impl<_Tp, _Args...>>::value;
1769#pragma GCC diagnostic pop
1774 template<
typename _Tp>
1776 {
using type = _Tp; };
1778 template<
typename _Tp>
1780 {
using type = _Tp; };
1783 template<
typename _Tp>
1785 {
using type = _Tp; };
1787 template<
typename _Tp>
1789 {
using type = _Tp; };
1792#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_cv)
1793 template<
typename _Tp>
1795 {
using type = __remove_cv(_Tp); };
1797 template<
typename _Tp>
1799 {
using type = _Tp; };
1801 template<
typename _Tp>
1802 struct remove_cv<const _Tp>
1803 {
using type = _Tp; };
1805 template<
typename _Tp>
1807 {
using type = _Tp; };
1809 template<
typename _Tp>
1811 {
using type = _Tp; };
1815 template<
typename _Tp>
1817 {
using type = _Tp
const; };
1820 template<
typename _Tp>
1822 {
using type = _Tp
volatile; };
1825 template<
typename _Tp>
1827 {
using type = _Tp
const volatile; };
1829#ifdef __cpp_lib_transformation_trait_aliases
1831 template<typename _Tp>
1832 using remove_const_t =
typename remove_const<_Tp>::type;
1835 template<
typename _Tp>
1836 using remove_volatile_t =
typename remove_volatile<_Tp>::type;
1839 template<
typename _Tp>
1840 using remove_cv_t =
typename remove_cv<_Tp>::type;
1843 template<
typename _Tp>
1844 using add_const_t =
typename add_const<_Tp>::type;
1847 template<
typename _Tp>
1848 using add_volatile_t =
typename add_volatile<_Tp>::type;
1851 template<
typename _Tp>
1852 using add_cv_t =
typename add_cv<_Tp>::type;
1858#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_reference)
1859 template<
typename _Tp>
1861 {
using type = __remove_reference(_Tp); };
1863 template<
typename _Tp>
1865 {
using type = _Tp; };
1867 template<
typename _Tp>
1868 struct remove_reference<_Tp&>
1869 {
using type = _Tp; };
1871 template<
typename _Tp>
1873 {
using type = _Tp; };
1877 template<
typename _Tp>
1879 {
using type = __add_lval_ref_t<_Tp>; };
1882 template<
typename _Tp>
1884 {
using type = __add_rval_ref_t<_Tp>; };
1886#if __cplusplus > 201103L
1888 template<
typename _Tp>
1892 template<
typename _Tp>
1896 template<
typename _Tp>
1905 template<
typename _Unqualified,
bool _IsConst,
bool _IsVol>
1906 struct __cv_selector;
1908 template<
typename _Unqualified>
1909 struct __cv_selector<_Unqualified, false, false>
1910 {
using __type = _Unqualified; };
1912 template<
typename _Unqualified>
1913 struct __cv_selector<_Unqualified, false, true>
1914 {
using __type =
volatile _Unqualified; };
1916 template<
typename _Unqualified>
1917 struct __cv_selector<_Unqualified, true, false>
1918 {
using __type =
const _Unqualified; };
1920 template<
typename _Unqualified>
1921 struct __cv_selector<_Unqualified, true, true>
1922 {
using __type =
const volatile _Unqualified; };
1924 template<
typename _Qualified,
typename _Unqualified,
1927 class __match_cv_qualifiers
1929 using __match = __cv_selector<_Unqualified, _IsConst, _IsVol>;
1932 using __type =
typename __match::__type;
1936 template<
typename _Tp>
1937 struct __make_unsigned
1938 {
using __type = _Tp; };
1941 struct __make_unsigned<char>
1942 {
using __type =
unsigned char; };
1945 struct __make_unsigned<signed char>
1946 {
using __type =
unsigned char; };
1949 struct __make_unsigned<short>
1950 {
using __type =
unsigned short; };
1953 struct __make_unsigned<int>
1954 {
using __type =
unsigned int; };
1957 struct __make_unsigned<long>
1958 {
using __type =
unsigned long; };
1961 struct __make_unsigned<long long>
1962 {
using __type =
unsigned long long; };
1964#if defined(__GLIBCXX_TYPE_INT_N_0)
1967 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_0>
1968 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_0; };
1970#if defined(__GLIBCXX_TYPE_INT_N_1)
1973 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_1>
1974 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_1; };
1976#if defined(__GLIBCXX_TYPE_INT_N_2)
1979 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_2>
1980 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_2; };
1982#if defined(__GLIBCXX_TYPE_INT_N_3)
1985 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_3>
1986 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_3; };
1988#if defined __SIZEOF_INT128__ && defined __STRICT_ANSI__
1991 struct __make_unsigned<__int128>
1992 {
using __type =
unsigned __int128; };
1996 template<
typename _Tp,
1998 bool _IsEnum = __is_enum(_Tp)>
1999 class __make_unsigned_selector;
2001 template<
typename _Tp>
2002 class __make_unsigned_selector<_Tp, true, false>
2004 using __unsigned_type
2005 =
typename __make_unsigned<__remove_cv_t<_Tp>>::__type;
2009 =
typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type;
2012 class __make_unsigned_selector_base
2015 template<
typename...>
struct _List { };
2017 template<
typename _Tp,
typename... _Up>
2018 struct _List<_Tp, _Up...> : _List<_Up...>
2019 {
static constexpr size_t __size =
sizeof(_Tp); };
2021 template<
size_t _Sz,
typename _Tp,
bool = (_Sz <= _Tp::__size)>
2024 template<
size_t _Sz,
typename _U
int,
typename... _UInts>
2025 struct __select<_Sz, _List<_Uint, _UInts...>,
true>
2026 {
using __type = _Uint; };
2028 template<
size_t _Sz,
typename _Uint,
typename... _UInts>
2029 struct __select<_Sz, _List<_Uint, _UInts...>, false>
2030 : __select<_Sz, _List<_UInts...>>
2035 template<
typename _Tp>
2036 class __make_unsigned_selector<_Tp, false, true>
2037 : __make_unsigned_selector_base
2041 using _UInts = _List<
unsigned char,
unsigned short,
unsigned int,
2042 unsigned long,
unsigned long long
2043#ifdef __SIZEOF_INT128__
2048 using __unsigned_type =
typename __select<
sizeof(_Tp), _UInts>::__type;
2052 =
typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type;
2060 struct __make_unsigned<wchar_t>
2063 =
typename __make_unsigned_selector<wchar_t, false, true>::__type;
2066#ifdef _GLIBCXX_USE_CHAR8_T
2068 struct __make_unsigned<char8_t>
2071 =
typename __make_unsigned_selector<char8_t, false, true>::__type;
2076 struct __make_unsigned<char16_t>
2079 =
typename __make_unsigned_selector<char16_t, false, true>::__type;
2083 struct __make_unsigned<char32_t>
2086 =
typename __make_unsigned_selector<char32_t, false, true>::__type;
2094 template<
typename _Tp>
2096 {
using type =
typename __make_unsigned_selector<_Tp>::__type; };
2107 template<
typename _Tp>
2108 struct __make_signed
2109 {
using __type = _Tp; };
2112 struct __make_signed<char>
2113 {
using __type =
signed char; };
2116 struct __make_signed<unsigned char>
2117 {
using __type =
signed char; };
2120 struct __make_signed<unsigned short>
2121 {
using __type =
signed short; };
2124 struct __make_signed<unsigned int>
2125 {
using __type =
signed int; };
2128 struct __make_signed<unsigned long>
2129 {
using __type =
signed long; };
2132 struct __make_signed<unsigned long long>
2133 {
using __type =
signed long long; };
2135#if defined(__GLIBCXX_TYPE_INT_N_0)
2138 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_0>
2139 {
using __type = __GLIBCXX_TYPE_INT_N_0; };
2141#if defined(__GLIBCXX_TYPE_INT_N_1)
2144 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_1>
2145 {
using __type = __GLIBCXX_TYPE_INT_N_1; };
2147#if defined(__GLIBCXX_TYPE_INT_N_2)
2150 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_2>
2151 {
using __type = __GLIBCXX_TYPE_INT_N_2; };
2153#if defined(__GLIBCXX_TYPE_INT_N_3)
2156 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_3>
2157 {
using __type = __GLIBCXX_TYPE_INT_N_3; };
2159#if defined __SIZEOF_INT128__ && defined __STRICT_ANSI__
2162 struct __make_signed<unsigned __int128>
2163 {
using __type = __int128; };
2167 template<
typename _Tp,
2169 bool _IsEnum = __is_enum(_Tp)>
2170 class __make_signed_selector;
2172 template<
typename _Tp>
2173 class __make_signed_selector<_Tp, true, false>
2176 =
typename __make_signed<__remove_cv_t<_Tp>>::__type;
2180 =
typename __match_cv_qualifiers<_Tp, __signed_type>::__type;
2184 template<
typename _Tp>
2185 class __make_signed_selector<_Tp, false, true>
2187 using __unsigned_type =
typename __make_unsigned_selector<_Tp>::__type;
2190 using __type =
typename __make_signed_selector<__unsigned_type>::__type;
2198 struct __make_signed<wchar_t>
2201 =
typename __make_signed_selector<wchar_t, false, true>::__type;
2204#if defined(_GLIBCXX_USE_CHAR8_T)
2206 struct __make_signed<char8_t>
2209 =
typename __make_signed_selector<char8_t, false, true>::__type;
2214 struct __make_signed<char16_t>
2217 =
typename __make_signed_selector<char16_t, false, true>::__type;
2221 struct __make_signed<char32_t>
2224 =
typename __make_signed_selector<char32_t, false, true>::__type;
2232 template<
typename _Tp>
2234 {
using type =
typename __make_signed_selector<_Tp>::__type; };
2240 template<>
struct make_signed<bool const volatile>;
2242#if __cplusplus > 201103L
2244 template<
typename _Tp>
2248 template<
typename _Tp>
2255#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_extent)
2256 template<
typename _Tp>
2258 {
using type = __remove_extent(_Tp); };
2260 template<
typename _Tp>
2262 {
using type = _Tp; };
2264 template<
typename _Tp, std::
size_t _Size>
2265 struct remove_extent<_Tp[_Size]>
2266 {
using type = _Tp; };
2268 template<
typename _Tp>
2270 {
using type = _Tp; };
2274#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_all_extents)
2275 template<
typename _Tp>
2277 {
using type = __remove_all_extents(_Tp); };
2279 template<
typename _Tp>
2281 {
using type = _Tp; };
2283 template<
typename _Tp, std::
size_t _Size>
2284 struct remove_all_extents<_Tp[_Size]>
2285 {
using type =
typename remove_all_extents<_Tp>::type; };
2287 template<
typename _Tp>
2289 {
using type =
typename remove_all_extents<_Tp>::type; };
2292#if __cplusplus > 201103L
2294 template<
typename _Tp>
2298 template<
typename _Tp>
2305#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_pointer)
2306 template<
typename _Tp>
2308 {
using type = __remove_pointer(_Tp); };
2310 template<
typename _Tp,
typename>
2311 struct __remove_pointer_helper
2312 {
using type = _Tp; };
2314 template<
typename _Tp,
typename _Up>
2315 struct __remove_pointer_helper<_Tp, _Up*>
2316 {
using type = _Up; };
2318 template<
typename _Tp>
2320 :
public __remove_pointer_helper<_Tp, __remove_cv_t<_Tp>>
2325#if _GLIBCXX_USE_BUILTIN_TRAIT(__add_pointer)
2326 template<
typename _Tp>
2328 {
using type = __add_pointer(_Tp); };
2330 template<
typename _Tp,
typename =
void>
2331 struct __add_pointer_helper
2332 {
using type = _Tp; };
2334 template<
typename _Tp>
2335 struct __add_pointer_helper<_Tp, __void_t<_Tp*>>
2336 {
using type = _Tp*; };
2338 template<
typename _Tp>
2340 :
public __add_pointer_helper<_Tp>
2343 template<
typename _Tp>
2345 {
using type = _Tp*; };
2347 template<
typename _Tp>
2349 {
using type = _Tp*; };
2352#if __cplusplus > 201103L
2354 template<
typename _Tp>
2358 template<
typename _Tp>
2365 struct __attribute__((__aligned__)) __aligned_storage_max_align_t
2369 __aligned_storage_default_alignment([[__maybe_unused__]]
size_t __len)
2371#if _GLIBCXX_INLINE_VERSION
2373 = integral_constant<size_t,
alignof(__aligned_storage_max_align_t)>;
2375 return __len > (_Max_align::value / 2)
2377#
if _GLIBCXX_USE_BUILTIN_TRAIT(__builtin_clzg)
2378 : 1 << (__SIZE_WIDTH__ - __builtin_clzg(__len - 1u));
2380 : 1 << (__LLONG_WIDTH__ - __builtin_clzll(__len - 1ull));
2385 return alignof(__aligned_storage_max_align_t);
2421 template<
size_t _Len,
2422 size_t _Align = __aligned_storage_default_alignment(_Len)>
2424 _GLIBCXX23_DEPRECATED
2429 alignas(_Align)
unsigned char __data[_Len];
2433 template <
typename... _Types>
2434 struct __strictest_alignment
2436 static const size_t _S_alignment = 0;
2437 static const size_t _S_size = 0;
2440 template <
typename _Tp,
typename... _Types>
2441 struct __strictest_alignment<_Tp, _Types...>
2443 static const size_t _S_alignment =
2444 alignof(_Tp) > __strictest_alignment<_Types...>::_S_alignment
2445 ?
alignof(_Tp) : __strictest_alignment<_Types...>::_S_alignment;
2446 static const size_t _S_size =
2447 sizeof(_Tp) > __strictest_alignment<_Types...>::_S_size
2448 ?
sizeof(_Tp) : __strictest_alignment<_Types...>::_S_size;
2451#pragma GCC diagnostic push
2452#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2466 template <
size_t _Len,
typename... _Types>
2468 _GLIBCXX23_DEPRECATED
2472 static_assert(
sizeof...(_Types) != 0,
"At least one type is required");
2474 using __strictest = __strictest_alignment<_Types...>;
2475 static const size_t _S_len = _Len > __strictest::_S_size
2476 ? _Len : __strictest::_S_size;
2481 using type =
typename aligned_storage<_S_len, alignment_value>::type;
2484 template <
size_t _Len,
typename... _Types>
2485 const size_t aligned_union<_Len, _Types...>::alignment_value;
2486#pragma GCC diagnostic pop
2490#if _GLIBCXX_USE_BUILTIN_TRAIT(__decay)
2491 template<
typename _Tp>
2493 {
using type = __decay(_Tp); };
2497 template<
typename _Up>
2498 struct __decay_selector
2499 : __conditional_t<is_const<const _Up>::value,
2504 template<
typename _Up,
size_t _Nm>
2505 struct __decay_selector<_Up[_Nm]>
2506 {
using type = _Up*; };
2508 template<
typename _Up>
2509 struct __decay_selector<_Up[]>
2510 {
using type = _Up*; };
2515 template<
typename _Tp>
2517 {
using type =
typename __decay_selector<_Tp>::type; };
2519 template<
typename _Tp>
2521 {
using type =
typename __decay_selector<_Tp>::type; };
2523 template<
typename _Tp>
2525 {
using type =
typename __decay_selector<_Tp>::type; };
2531 template<
typename _Tp>
2532 struct __strip_reference_wrapper
2537 template<
typename _Tp>
2540 using __type = _Tp&;
2544 template<
typename _Tp>
2545 using __decay_t =
typename decay<_Tp>::type;
2547 template<
typename _Tp>
2548 using __decay_and_strip = __strip_reference_wrapper<__decay_t<_Tp>>;
2554 template<
typename... _Cond>
2555 using _Require = __enable_if_t<__and_<_Cond...>::value>;
2558 template<
typename _Tp>
2559 using __remove_cvref_t
2565 template<
bool _Cond,
typename _Iftrue,
typename _Iffalse>
2567 {
using type = _Iftrue; };
2570 template<
typename _Iftrue,
typename _Iffalse>
2572 {
using type = _Iffalse; };
2575 template<
typename... _Tp>
2587 template<
typename _Tp>
2588 struct __success_type
2589 {
using type = _Tp; };
2591 struct __failure_type
2594 struct __do_common_type_impl
2596 template<
typename _Tp,
typename _Up>
2602 template<
typename _Tp,
typename _Up>
2603 static __success_type<__decay_t<__cond_t<_Tp, _Up>>>
2606#if __cplusplus > 201703L
2609 template<
typename _Tp,
typename _Up>
2610 static __success_type<__remove_cvref_t<__cond_t<const _Tp&, const _Up&>>>
2614 template<
typename,
typename>
2615 static __failure_type
2618 template<
typename _Tp,
typename _Up>
2619 static decltype(_S_test_2<_Tp, _Up>(0))
2629 template<
typename _Tp0>
2635 template<
typename _Tp1,
typename _Tp2,
2636 typename _Dp1 = __decay_t<_Tp1>,
typename _Dp2 = __decay_t<_Tp2>>
2637 struct __common_type_impl
2641 using type = common_type<_Dp1, _Dp2>;
2644 template<
typename _Tp1,
typename _Tp2>
2645 struct __common_type_impl<_Tp1, _Tp2, _Tp1, _Tp2>
2646 :
private __do_common_type_impl
2650 using type =
decltype(_S_test<_Tp1, _Tp2>(0));
2654 template<
typename _Tp1,
typename _Tp2>
2656 :
public __common_type_impl<_Tp1, _Tp2>::type
2659 template<
typename...>
2660 struct __common_type_pack
2663 template<
typename,
typename,
typename =
void>
2664 struct __common_type_fold;
2667 template<
typename _Tp1,
typename _Tp2,
typename... _Rp>
2669 :
public __common_type_fold<common_type<_Tp1, _Tp2>,
2670 __common_type_pack<_Rp...>>
2676 template<
typename _CTp,
typename... _Rp>
2677 struct __common_type_fold<_CTp, __common_type_pack<_Rp...>,
2678 __void_t<typename _CTp::type>>
2683 template<
typename _CTp,
typename _Rp>
2684 struct __common_type_fold<_CTp, _Rp, void>
2687 template<
typename _Tp,
bool = __is_enum(_Tp)>
2688 struct __underlying_type_impl
2690 using type = __underlying_type(_Tp);
2693 template<
typename _Tp>
2694 struct __underlying_type_impl<_Tp, false>
2699 template<
typename _Tp>
2701 :
public __underlying_type_impl<_Tp>
2705 template<
typename _Tp>
2706 struct __declval_protector
2708 static const bool __stop =
false;
2716 template<
typename _Tp>
2717 auto declval() noexcept -> decltype(__declval<_Tp>(0))
2719 static_assert(__declval_protector<_Tp>::__stop,
2720 "declval() must not be used!");
2721 return __declval<_Tp>(0);
2725 template<
typename _Signature>
2731 struct __invoke_memfun_ref { };
2732 struct __invoke_memfun_deref { };
2733 struct __invoke_memobj_ref { };
2734 struct __invoke_memobj_deref { };
2735 struct __invoke_other { };
2738 template<
typename _Tp,
typename _Tag>
2739 struct __result_of_success : __success_type<_Tp>
2740 {
using __invoke_type = _Tag; };
2743 struct __result_of_memfun_ref_impl
2745 template<
typename _Fp,
typename _Tp1,
typename... _Args>
2746 static __result_of_success<
decltype(
2748 ), __invoke_memfun_ref> _S_test(
int);
2750 template<
typename...>
2751 static __failure_type _S_test(...);
2754 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2755 struct __result_of_memfun_ref
2756 :
private __result_of_memfun_ref_impl
2758 using type =
decltype(_S_test<_MemPtr, _Arg, _Args...>(0));
2762 struct __result_of_memfun_deref_impl
2764 template<
typename _Fp,
typename _Tp1,
typename... _Args>
2765 static __result_of_success<
decltype(
2767 ), __invoke_memfun_deref> _S_test(
int);
2769 template<
typename...>
2770 static __failure_type _S_test(...);
2773 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2774 struct __result_of_memfun_deref
2775 :
private __result_of_memfun_deref_impl
2777 using type =
decltype(_S_test<_MemPtr, _Arg, _Args...>(0));
2781 struct __result_of_memobj_ref_impl
2783 template<
typename _Fp,
typename _Tp1>
2784 static __result_of_success<
decltype(
2786 ), __invoke_memobj_ref> _S_test(
int);
2788 template<
typename,
typename>
2789 static __failure_type _S_test(...);
2792 template<
typename _MemPtr,
typename _Arg>
2793 struct __result_of_memobj_ref
2794 :
private __result_of_memobj_ref_impl
2796 using type =
decltype(_S_test<_MemPtr, _Arg>(0));
2800 struct __result_of_memobj_deref_impl
2802 template<
typename _Fp,
typename _Tp1>
2803 static __result_of_success<
decltype(
2805 ), __invoke_memobj_deref> _S_test(
int);
2807 template<
typename,
typename>
2808 static __failure_type _S_test(...);
2811 template<
typename _MemPtr,
typename _Arg>
2812 struct __result_of_memobj_deref
2813 :
private __result_of_memobj_deref_impl
2815 using type =
decltype(_S_test<_MemPtr, _Arg>(0));
2818 template<
typename _MemPtr,
typename _Arg>
2819 struct __result_of_memobj;
2821 template<
typename _Res,
typename _Class,
typename _Arg>
2822 struct __result_of_memobj<_Res _Class::*, _Arg>
2824 using _Argval = __remove_cvref_t<_Arg>;
2825 using _MemPtr = _Res _Class::*;
2826 using type =
typename __conditional_t<__or_<is_same<_Argval, _Class>,
2827 is_base_of<_Class, _Argval>>::value,
2828 __result_of_memobj_ref<_MemPtr, _Arg>,
2829 __result_of_memobj_deref<_MemPtr, _Arg>
2833 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2834 struct __result_of_memfun;
2836 template<
typename _Res,
typename _Class,
typename _Arg,
typename... _Args>
2837 struct __result_of_memfun<_Res _Class::*, _Arg, _Args...>
2839 using _Argval =
typename remove_reference<_Arg>::type;
2840 using _MemPtr = _Res _Class::*;
2841 using type =
typename __conditional_t<is_base_of<_Class, _Argval>::value,
2842 __result_of_memfun_ref<_MemPtr, _Arg, _Args...>,
2843 __result_of_memfun_deref<_MemPtr, _Arg, _Args...>
2852 template<
typename _Tp,
typename _Up = __remove_cvref_t<_Tp>>
2858 template<
typename _Tp,
typename _Up>
2864 template<bool, bool,
typename _Functor,
typename... _ArgTypes>
2865 struct __result_of_impl
2867 using type = __failure_type;
2870 template<
typename _MemPtr,
typename _Arg>
2871 struct __result_of_impl<true, false, _MemPtr, _Arg>
2872 :
public __result_of_memobj<__decay_t<_MemPtr>,
2873 typename __inv_unwrap<_Arg>::type>
2876 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2877 struct __result_of_impl<false, true, _MemPtr, _Arg, _Args...>
2878 :
public __result_of_memfun<__decay_t<_MemPtr>,
2879 typename __inv_unwrap<_Arg>::type, _Args...>
2883 struct __result_of_other_impl
2885 template<
typename _Fn,
typename... _Args>
2886 static __result_of_success<
decltype(
2888 ), __invoke_other> _S_test(
int);
2890 template<
typename...>
2891 static __failure_type _S_test(...);
2894 template<
typename _Functor,
typename... _ArgTypes>
2895 struct __result_of_impl<false, false, _Functor, _ArgTypes...>
2896 :
private __result_of_other_impl
2898 using type =
decltype(_S_test<_Functor, _ArgTypes...>(0));
2902 template<
typename _Functor,
typename... _ArgTypes>
2903 struct __invoke_result
2904 :
public __result_of_impl<
2905 is_member_object_pointer<
2906 typename remove_reference<_Functor>::type
2908 is_member_function_pointer<
2909 typename remove_reference<_Functor>::type
2911 _Functor, _ArgTypes...
2916 template<
typename _Fn,
typename... _Args>
2917 using __invoke_result_t =
typename __invoke_result<_Fn, _Args...>::type;
2920 template<
typename _Functor,
typename... _ArgTypes>
2921 struct result_of<_Functor(_ArgTypes...)>
2922 :
public __invoke_result<_Functor, _ArgTypes...>
2923 { } _GLIBCXX17_DEPRECATED_SUGGEST(
"std::invoke_result");
2925#if __cplusplus >= 201402L
2926#pragma GCC diagnostic push
2927#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2929 template<
size_t _Len,
2930 size_t _Align = __aligned_storage_default_alignment(_Len)>
2931 using aligned_storage_t _GLIBCXX23_DEPRECATED =
typename aligned_storage<_Len, _Align>::type;
2933 template <
size_t _Len,
typename... _Types>
2934 using aligned_union_t _GLIBCXX23_DEPRECATED =
typename aligned_union<_Len, _Types...>::type;
2935#pragma GCC diagnostic pop
2938 template<
typename _Tp>
2939 using decay_t =
typename decay<_Tp>::type;
2942 template<
bool _Cond,
typename _Tp =
void>
2946 template<
bool _Cond,
typename _Iftrue,
typename _Iffalse>
2947 using conditional_t =
typename conditional<_Cond, _Iftrue, _Iffalse>::type;
2950 template<
typename... _Tp>
2954 template<
typename _Tp>
2958 template<
typename _Tp>
2962#ifdef __cpp_lib_void_t
2964 template<typename...> using void_t = void;
2974 template<
typename _Def,
template<
typename...>
class _Op,
typename... _Args>
2975 struct __detected_or
2982 template<
typename _Def,
template<
typename...>
class _Op,
typename... _Args>
2983 requires requires {
typename _Op<_Args...>; }
2984 struct __detected_or<_Def, _Op, _Args...>
2986 using type = _Op<_Args...>;
2991 template<
typename _Default,
typename _AlwaysVoid,
2992 template<
typename...>
class _Op,
typename... _Args>
2995 using type = _Default;
3000 template<
typename _Default,
template<
typename...>
class _Op,
3002 struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...>
3004 using type = _Op<_Args...>;
3008 template<
typename _Default,
template<
typename...>
class _Op,
3010 using __detected_or = __detector<_Default, void, _Op, _Args...>;
3014 template<
typename _Default,
template<
typename...>
class _Op,
3016 using __detected_or_t
3017 =
typename __detected_or<_Default, _Op, _Args...>::type;
3023#define _GLIBCXX_HAS_NESTED_TYPE(_NTYPE) \
3024 template<typename _Tp, typename = __void_t<>> \
3025 struct __has_##_NTYPE \
3028 template<typename _Tp> \
3029 struct __has_##_NTYPE<_Tp, __void_t<typename _Tp::_NTYPE>> \
3033 template <
typename _Tp>
3034 struct __is_swappable;
3036 template <
typename _Tp>
3037 struct __is_nothrow_swappable;
3044 template<
typename _Tp>
3045 struct __is_tuple_like
3046 :
public __is_tuple_like_impl<__remove_cvref_t<_Tp>>::type
3050 template<
typename _Tp>
3051 _GLIBCXX20_CONSTEXPR
3053 _Require<__not_<__is_tuple_like<_Tp>>,
3057 noexcept(__and_<is_nothrow_move_constructible<_Tp>,
3060 template<
typename _Tp,
size_t _Nm>
3061 _GLIBCXX20_CONSTEXPR
3063 __enable_if_t<__is_swappable<_Tp>::value>
3064 swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
3065 noexcept(__is_nothrow_swappable<_Tp>::value);
3068 namespace __swappable_details {
3071 struct __do_is_swappable_impl
3073 template<
typename _Tp,
typename
3075 static true_type __test(
int);
3081 struct __do_is_nothrow_swappable_impl
3083 template<
typename _Tp>
3084 static __bool_constant<
3094 template<
typename _Tp>
3095 struct __is_swappable_impl
3096 :
public __swappable_details::__do_is_swappable_impl
3098 using type =
decltype(__test<_Tp>(0));
3101 template<
typename _Tp>
3102 struct __is_nothrow_swappable_impl
3103 :
public __swappable_details::__do_is_nothrow_swappable_impl
3105 using type =
decltype(__test<_Tp>(0));
3108 template<
typename _Tp>
3109 struct __is_swappable
3110 :
public __is_swappable_impl<_Tp>::type
3113 template<
typename _Tp>
3114 struct __is_nothrow_swappable
3115 :
public __is_nothrow_swappable_impl<_Tp>::type
3119#ifdef __cpp_lib_is_swappable
3123 template<
typename _Tp>
3125 :
public __is_swappable_impl<_Tp>::type
3127 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3128 "template argument must be a complete class or an unbounded array");
3132 template<
typename _Tp>
3133 struct is_nothrow_swappable
3134 :
public __is_nothrow_swappable_impl<_Tp>::type
3136 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3137 "template argument must be a complete class or an unbounded array");
3140#if __cplusplus >= 201402L
3142 template<
typename _Tp>
3143 _GLIBCXX17_INLINE
constexpr bool is_swappable_v =
3144 is_swappable<_Tp>::value;
3147 template<
typename _Tp>
3148 _GLIBCXX17_INLINE
constexpr bool is_nothrow_swappable_v =
3149 is_nothrow_swappable<_Tp>::value;
3153 namespace __swappable_with_details {
3156 struct __do_is_swappable_with_impl
3158 template<
typename _Tp,
typename _Up,
typename
3164 template<
typename,
typename>
3168 struct __do_is_nothrow_swappable_with_impl
3170 template<
typename _Tp,
typename _Up>
3171 static __bool_constant<
3177 template<
typename,
typename>
3183 template<
typename _Tp,
typename _Up>
3184 struct __is_swappable_with_impl
3185 :
public __swappable_with_details::__do_is_swappable_with_impl
3187 using type =
decltype(__test<_Tp, _Up>(0));
3191 template<
typename _Tp>
3192 struct __is_swappable_with_impl<_Tp&, _Tp&>
3193 :
public __swappable_details::__do_is_swappable_impl
3195 using type =
decltype(__test<_Tp&>(0));
3198 template<
typename _Tp,
typename _Up>
3199 struct __is_nothrow_swappable_with_impl
3200 :
public __swappable_with_details::__do_is_nothrow_swappable_with_impl
3202 using type =
decltype(__test<_Tp, _Up>(0));
3206 template<
typename _Tp>
3207 struct __is_nothrow_swappable_with_impl<_Tp&, _Tp&>
3208 :
public __swappable_details::__do_is_nothrow_swappable_impl
3210 using type =
decltype(__test<_Tp&>(0));
3215 template<
typename _Tp,
typename _Up>
3216 struct is_swappable_with
3217 :
public __is_swappable_with_impl<_Tp, _Up>::type
3219 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3220 "first template argument must be a complete class or an unbounded array");
3221 static_assert(std::__is_complete_or_unbounded(__type_identity<_Up>{}),
3222 "second template argument must be a complete class or an unbounded array");
3226 template<
typename _Tp,
typename _Up>
3227 struct is_nothrow_swappable_with
3228 :
public __is_nothrow_swappable_with_impl<_Tp, _Up>::type
3230 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3231 "first template argument must be a complete class or an unbounded array");
3232 static_assert(std::__is_complete_or_unbounded(__type_identity<_Up>{}),
3233 "second template argument must be a complete class or an unbounded array");
3236#if __cplusplus >= 201402L
3238 template<
typename _Tp,
typename _Up>
3239 _GLIBCXX17_INLINE
constexpr bool is_swappable_with_v =
3240 is_swappable_with<_Tp, _Up>::value;
3243 template<
typename _Tp,
typename _Up>
3244 _GLIBCXX17_INLINE
constexpr bool is_nothrow_swappable_with_v =
3245 is_nothrow_swappable_with<_Tp, _Up>::value;
3255 template<
typename _Result,
typename _Ret,
3257 struct __is_invocable_impl
3264 template<
typename _Result,
typename _Ret>
3265 struct __is_invocable_impl<_Result, _Ret,
3267 __void_t<typename _Result::type>>
3273#pragma GCC diagnostic push
3274#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
3276 template<
typename _Result,
typename _Ret>
3277 struct __is_invocable_impl<_Result, _Ret,
3279 __void_t<typename _Result::type>>
3283 using _Res_t =
typename _Result::type;
3287 static _Res_t _S_get() noexcept;
3290 template<typename _Tp>
3291 static
void _S_conv(__type_identity_t<_Tp>) noexcept;
3294 template<typename _Tp,
3295 bool _Nothrow = noexcept(_S_conv<_Tp>(_S_get())),
3296 typename = decltype(_S_conv<_Tp>(_S_get())),
3297#if __has_builtin(__reference_converts_from_temporary)
3298 bool _Dangle = __reference_converts_from_temporary(_Tp, _Res_t)
3300 bool _Dangle =
false
3303 static __bool_constant<_Nothrow && !_Dangle>
3306 template<
typename _Tp,
bool = false>
3312 using type =
decltype(_S_test<_Ret,
true>(1));
3315 using __nothrow_conv =
decltype(_S_test<_Ret>(1));
3317#pragma GCC diagnostic pop
3319 template<
typename _Fn,
typename... _ArgTypes>
3320 struct __is_invocable
3321#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_invocable)
3322 : __bool_constant<__is_invocable(_Fn, _ArgTypes...)>
3324 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type
3328 template<
typename _Fn,
typename _Tp,
typename... _Args>
3329 constexpr bool __call_is_nt(__invoke_memfun_ref)
3331 using _Up =
typename __inv_unwrap<_Tp>::type;
3336 template<
typename _Fn,
typename _Tp,
typename... _Args>
3337 constexpr bool __call_is_nt(__invoke_memfun_deref)
3343 template<
typename _Fn,
typename _Tp>
3344 constexpr bool __call_is_nt(__invoke_memobj_ref)
3346 using _Up =
typename __inv_unwrap<_Tp>::type;
3350 template<
typename _Fn,
typename _Tp>
3351 constexpr bool __call_is_nt(__invoke_memobj_deref)
3356 template<
typename _Fn,
typename... _Args>
3357 constexpr bool __call_is_nt(__invoke_other)
3362 template<
typename _Result,
typename _Fn,
typename... _Args>
3363 struct __call_is_nothrow
3365 std::__call_is_nt<_Fn, _Args...>(typename _Result::__invoke_type{})
3369 template<
typename _Fn,
typename... _Args>
3370 using __call_is_nothrow_
3371 = __call_is_nothrow<__invoke_result<_Fn, _Args...>, _Fn, _Args...>;
3374 template<
typename _Fn,
typename... _Args>
3375 struct __is_nothrow_invocable
3376#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_invocable)
3377 : __bool_constant<__is_nothrow_invocable(_Fn, _Args...)>
3379 : __and_<__is_invocable<_Fn, _Args...>,
3380 __call_is_nothrow_<_Fn, _Args...>>::type
3384#pragma GCC diagnostic push
3385#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
3386 struct __nonesuchbase {};
3387 struct __nonesuch :
private __nonesuchbase {
3388 ~__nonesuch() =
delete;
3389 __nonesuch(__nonesuch
const&) =
delete;
3390 void operator=(__nonesuch
const&) =
delete;
3392#pragma GCC diagnostic pop
3395#ifdef __cpp_lib_is_invocable
3397 template<typename _Functor, typename... _ArgTypes>
3398 struct invoke_result
3399 :
public __invoke_result<_Functor, _ArgTypes...>
3401 static_assert(std::__is_complete_or_unbounded(__type_identity<_Functor>{}),
3402 "_Functor must be a complete class or an unbounded array");
3403 static_assert((std::__is_complete_or_unbounded(
3404 __type_identity<_ArgTypes>{}) && ...),
3405 "each argument type must be a complete class or an unbounded array");
3409 template<
typename _Fn,
typename... _Args>
3410 using invoke_result_t =
typename invoke_result<_Fn, _Args...>::type;
3413 template<
typename _Fn,
typename... _ArgTypes>
3415#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_invocable)
3416 :
public __bool_constant<__is_invocable(_Fn, _ArgTypes...)>
3418 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type
3421 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3422 "_Fn must be a complete class or an unbounded array");
3423 static_assert((std::__is_complete_or_unbounded(
3424 __type_identity<_ArgTypes>{}) && ...),
3425 "each argument type must be a complete class or an unbounded array");
3429 template<
typename _Ret,
typename _Fn,
typename... _ArgTypes>
3430 struct is_invocable_r
3431 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>::type
3433 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3434 "_Fn must be a complete class or an unbounded array");
3435 static_assert((std::__is_complete_or_unbounded(
3436 __type_identity<_ArgTypes>{}) && ...),
3437 "each argument type must be a complete class or an unbounded array");
3438 static_assert(std::__is_complete_or_unbounded(__type_identity<_Ret>{}),
3439 "_Ret must be a complete class or an unbounded array");
3443 template<
typename _Fn,
typename... _ArgTypes>
3444 struct is_nothrow_invocable
3445#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_invocable)
3446 :
public __bool_constant<__is_nothrow_invocable(_Fn, _ArgTypes...)>
3448 : __and_<__is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>,
3449 __call_is_nothrow_<_Fn, _ArgTypes...>>::type
3452 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3453 "_Fn must be a complete class or an unbounded array");
3454 static_assert((std::__is_complete_or_unbounded(
3455 __type_identity<_ArgTypes>{}) && ...),
3456 "each argument type must be a complete class or an unbounded array");
3463 template<
typename _Result,
typename _Ret>
3464 using __is_nt_invocable_impl
3465 =
typename __is_invocable_impl<_Result, _Ret>::__nothrow_conv;
3469 template<
typename _Ret,
typename _Fn,
typename... _ArgTypes>
3470 struct is_nothrow_invocable_r
3471 : __and_<__is_nt_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>,
3472 __call_is_nothrow_<_Fn, _ArgTypes...>>::type
3474 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3475 "_Fn must be a complete class or an unbounded array");
3476 static_assert((std::__is_complete_or_unbounded(
3477 __type_identity<_ArgTypes>{}) && ...),
3478 "each argument type must be a complete class or an unbounded array");
3479 static_assert(std::__is_complete_or_unbounded(__type_identity<_Ret>{}),
3480 "_Ret must be a complete class or an unbounded array");
3484#if __cpp_lib_type_trait_variable_templates
3499template <
typename _Tp>
3501template <
typename _Tp>
3502 inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value;
3503template <
typename _Tp>
3505template <
typename _Tp>
3508#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_array)
3509template <
typename _Tp>
3510 inline constexpr bool is_array_v = __is_array(_Tp);
3512template <
typename _Tp>
3513 inline constexpr bool is_array_v =
false;
3514template <
typename _Tp>
3515 inline constexpr bool is_array_v<_Tp[]> =
true;
3516template <
typename _Tp,
size_t _Num>
3517 inline constexpr bool is_array_v<_Tp[_Num]> =
true;
3520#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_pointer)
3521template <
typename _Tp>
3522 inline constexpr bool is_pointer_v = __is_pointer(_Tp);
3524template <
typename _Tp>
3525 inline constexpr bool is_pointer_v =
false;
3526template <
typename _Tp>
3527 inline constexpr bool is_pointer_v<_Tp*> =
true;
3528template <
typename _Tp>
3529 inline constexpr bool is_pointer_v<_Tp* const> =
true;
3530template <
typename _Tp>
3531 inline constexpr bool is_pointer_v<_Tp* volatile> =
true;
3532template <
typename _Tp>
3533 inline constexpr bool is_pointer_v<_Tp* const volatile> =
true;
3536template <
typename _Tp>
3537 inline constexpr bool is_lvalue_reference_v =
false;
3538template <
typename _Tp>
3539 inline constexpr bool is_lvalue_reference_v<_Tp&> =
true;
3540template <
typename _Tp>
3541 inline constexpr bool is_rvalue_reference_v =
false;
3542template <
typename _Tp>
3543 inline constexpr bool is_rvalue_reference_v<_Tp&&> =
true;
3545#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_object_pointer)
3546template <
typename _Tp>
3547 inline constexpr bool is_member_object_pointer_v =
3548 __is_member_object_pointer(_Tp);
3550template <
typename _Tp>
3551 inline constexpr bool is_member_object_pointer_v =
3555#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_function_pointer)
3556template <
typename _Tp>
3557 inline constexpr bool is_member_function_pointer_v =
3558 __is_member_function_pointer(_Tp);
3560template <
typename _Tp>
3561 inline constexpr bool is_member_function_pointer_v =
3565#if __cpp_impl_reflection >= 202506L
3566template <
typename _Tp>
3567 inline constexpr bool is_reflection_v =
false;
3569 inline constexpr bool is_reflection_v<
decltype(^^int)> =
true;
3571 inline constexpr bool is_reflection_v<
const decltype(^^int)> =
true;
3573 inline constexpr bool is_reflection_v<
volatile decltype(^^int)> =
true;
3575 inline constexpr bool is_reflection_v<
const volatile decltype(^^int)> =
true;
3578template <
typename _Tp>
3579 inline constexpr bool is_enum_v = __is_enum(_Tp);
3580template <
typename _Tp>
3581 inline constexpr bool is_union_v = __is_union(_Tp);
3582template <
typename _Tp>
3583 inline constexpr bool is_class_v = __is_class(_Tp);
3586#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_reference)
3587template <
typename _Tp>
3588 inline constexpr bool is_reference_v = __is_reference(_Tp);
3590template <
typename _Tp>
3591 inline constexpr bool is_reference_v =
false;
3592template <
typename _Tp>
3593 inline constexpr bool is_reference_v<_Tp&> =
true;
3594template <
typename _Tp>
3595 inline constexpr bool is_reference_v<_Tp&&> =
true;
3598template <
typename _Tp>
3600template <
typename _Tp>
3603#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_object)
3604template <
typename _Tp>
3605 inline constexpr bool is_object_v = __is_object(_Tp);
3607template <
typename _Tp>
3611template <
typename _Tp>
3613template <
typename _Tp>
3614 inline constexpr bool is_compound_v = !is_fundamental_v<_Tp>;
3616#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_pointer)
3617template <
typename _Tp>
3618 inline constexpr bool is_member_pointer_v = __is_member_pointer(_Tp);
3620template <
typename _Tp>
3624#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_const)
3625template <
typename _Tp>
3626 inline constexpr bool is_const_v = __is_const(_Tp);
3628template <
typename _Tp>
3629 inline constexpr bool is_const_v =
false;
3630template <
typename _Tp>
3631 inline constexpr bool is_const_v<const _Tp> =
true;
3634#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_function)
3635template <
typename _Tp>
3636 inline constexpr bool is_function_v = __is_function(_Tp);
3638template <
typename _Tp>
3639 inline constexpr bool is_function_v = !is_const_v<const _Tp>;
3640template <
typename _Tp>
3641 inline constexpr bool is_function_v<_Tp&> =
false;
3642template <
typename _Tp>
3643 inline constexpr bool is_function_v<_Tp&&> =
false;
3646#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_volatile)
3647template <
typename _Tp>
3648 inline constexpr bool is_volatile_v = __is_volatile(_Tp);
3650template <
typename _Tp>
3651 inline constexpr bool is_volatile_v =
false;
3652template <
typename _Tp>
3653 inline constexpr bool is_volatile_v<volatile _Tp> =
true;
3656template <
typename _Tp>
3657 _GLIBCXX26_DEPRECATED_SUGGEST(
"is_trivially_default_constructible_v && is_trivially_copyable_v")
3658 inline constexpr
bool is_trivial_v = __is_trivial(_Tp);
3659template <typename _Tp>
3660 inline constexpr
bool is_trivially_copyable_v = __is_trivially_copyable(_Tp);
3661template <typename _Tp>
3662 inline constexpr
bool is_standard_layout_v = __is_standard_layout(_Tp);
3663template <typename _Tp>
3664 _GLIBCXX20_DEPRECATED_SUGGEST(
"is_standard_layout_v && is_trivial_v")
3665 inline constexpr
bool is_pod_v = __is_pod(_Tp);
3666template <typename _Tp>
3667 _GLIBCXX17_DEPRECATED
3668 inline constexpr
bool is_literal_type_v = __is_literal_type(_Tp);
3669template <typename _Tp>
3670 inline constexpr
bool is_empty_v = __is_empty(_Tp);
3671template <typename _Tp>
3672 inline constexpr
bool is_polymorphic_v = __is_polymorphic(_Tp);
3673template <typename _Tp>
3674 inline constexpr
bool is_abstract_v = __is_abstract(_Tp);
3675template <typename _Tp>
3676 inline constexpr
bool is_final_v = __is_final(_Tp);
3678template <typename _Tp>
3679 inline constexpr
bool is_signed_v =
is_signed<_Tp>::value;
3680template <typename _Tp>
3681 inline constexpr
bool is_unsigned_v =
is_unsigned<_Tp>::value;
3683template <typename _Tp, typename... _Args>
3684 inline constexpr
bool is_constructible_v = __is_constructible(_Tp, _Args...);
3685template <typename _Tp>
3686 inline constexpr
bool is_default_constructible_v = __is_constructible(_Tp);
3687template <typename _Tp>
3688 inline constexpr
bool is_copy_constructible_v
3689 = __is_constructible(_Tp, __add_lval_ref_t<const _Tp>);
3690template <typename _Tp>
3691 inline constexpr
bool is_move_constructible_v
3692 = __is_constructible(_Tp, __add_rval_ref_t<_Tp>);
3694template <typename _Tp, typename _Up>
3695 inline constexpr
bool is_assignable_v = __is_assignable(_Tp, _Up);
3696template <typename _Tp>
3697 inline constexpr
bool is_copy_assignable_v
3698 = __is_assignable(__add_lval_ref_t<_Tp>, __add_lval_ref_t<const _Tp>);
3699template <typename _Tp>
3700 inline constexpr
bool is_move_assignable_v
3701 = __is_assignable(__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>);
3703#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_destructible)
3704template <
typename _Tp>
3705 inline constexpr bool is_destructible_v = __is_destructible(_Tp);
3707template <
typename _Tp>
3711template <
typename _Tp,
typename... _Args>
3712 inline constexpr bool is_trivially_constructible_v
3713 = __is_trivially_constructible(_Tp, _Args...);
3714template <
typename _Tp>
3715 inline constexpr bool is_trivially_default_constructible_v
3716 = __is_trivially_constructible(_Tp);
3717template <
typename _Tp>
3718 inline constexpr bool is_trivially_copy_constructible_v
3719 = __is_trivially_constructible(_Tp, __add_lval_ref_t<const _Tp>);
3720template <
typename _Tp>
3721 inline constexpr bool is_trivially_move_constructible_v
3722 = __is_trivially_constructible(_Tp, __add_rval_ref_t<_Tp>);
3724template <
typename _Tp,
typename _Up>
3725 inline constexpr bool is_trivially_assignable_v
3726 = __is_trivially_assignable(_Tp, _Up);
3727template <
typename _Tp>
3728 inline constexpr bool is_trivially_copy_assignable_v
3729 = __is_trivially_assignable(__add_lval_ref_t<_Tp>,
3730 __add_lval_ref_t<const _Tp>);
3731template <
typename _Tp>
3732 inline constexpr bool is_trivially_move_assignable_v
3733 = __is_trivially_assignable(__add_lval_ref_t<_Tp>,
3734 __add_rval_ref_t<_Tp>);
3736#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_trivially_destructible)
3737template <
typename _Tp>
3738 inline constexpr bool is_trivially_destructible_v
3739 = __is_trivially_destructible(_Tp);
3741template <
typename _Tp>
3742 inline constexpr bool is_trivially_destructible_v =
false;
3744template <
typename _Tp>
3745 requires (!is_reference_v<_Tp>) &&
requires (_Tp& __t) { __t.~_Tp(); }
3746 inline constexpr bool is_trivially_destructible_v<_Tp>
3747 = __has_trivial_destructor(_Tp);
3748template <
typename _Tp>
3749 inline constexpr bool is_trivially_destructible_v<_Tp&> =
true;
3750template <
typename _Tp>
3751 inline constexpr bool is_trivially_destructible_v<_Tp&&> =
true;
3752template <
typename _Tp,
size_t _Nm>
3753 inline constexpr bool is_trivially_destructible_v<_Tp[_Nm]>
3754 = is_trivially_destructible_v<_Tp>;
3756template <
typename _Tp>
3757 inline constexpr bool is_trivially_destructible_v =
3761template <
typename _Tp,
typename... _Args>
3762 inline constexpr bool is_nothrow_constructible_v
3763 = __is_nothrow_constructible(_Tp, _Args...);
3764template <
typename _Tp>
3765 inline constexpr bool is_nothrow_default_constructible_v
3766 = __is_nothrow_constructible(_Tp);
3767template <
typename _Tp>
3768 inline constexpr bool is_nothrow_copy_constructible_v
3769 = __is_nothrow_constructible(_Tp, __add_lval_ref_t<const _Tp>);
3770template <
typename _Tp>
3771 inline constexpr bool is_nothrow_move_constructible_v
3772 = __is_nothrow_constructible(_Tp, __add_rval_ref_t<_Tp>);
3774template <
typename _Tp,
typename _Up>
3775 inline constexpr bool is_nothrow_assignable_v
3776 = __is_nothrow_assignable(_Tp, _Up);
3777template <
typename _Tp>
3778 inline constexpr bool is_nothrow_copy_assignable_v
3779 = __is_nothrow_assignable(__add_lval_ref_t<_Tp>,
3780 __add_lval_ref_t<const _Tp>);
3781template <
typename _Tp>
3782 inline constexpr bool is_nothrow_move_assignable_v
3783 = __is_nothrow_assignable(__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>);
3785#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_destructible)
3786template <
typename _Tp>
3787 inline constexpr bool is_nothrow_destructible_v
3788 = __is_nothrow_destructible(_Tp);
3790template <
typename _Tp>
3791 inline constexpr bool is_nothrow_destructible_v =
3795template <
typename _Tp>
3796 inline constexpr bool has_virtual_destructor_v
3797 = __has_virtual_destructor(_Tp);
3799template <
typename _Tp>
3800 inline constexpr size_t alignment_of_v = alignment_of<_Tp>::value;
3802#if _GLIBCXX_USE_BUILTIN_TRAIT(__array_rank) \
3803 && (!defined(__clang__) || __clang_major__ >= 20)
3804template <
typename _Tp>
3805 inline constexpr size_t rank_v = __array_rank(_Tp);
3807template <
typename _Tp>
3808 inline constexpr size_t rank_v = 0;
3809template <
typename _Tp,
size_t _Size>
3810 inline constexpr size_t rank_v<_Tp[_Size]> = 1 + rank_v<_Tp>;
3811template <
typename _Tp>
3812 inline constexpr size_t rank_v<_Tp[]> = 1 + rank_v<_Tp>;
3815template <
typename _Tp,
unsigned _Idx = 0>
3816 inline constexpr size_t extent_v = 0;
3817template <
typename _Tp,
size_t _Size>
3818 inline constexpr size_t extent_v<_Tp[_Size], 0> = _Size;
3819template <
typename _Tp,
unsigned _Idx,
size_t _Size>
3820 inline constexpr size_t extent_v<_Tp[_Size], _Idx> = extent_v<_Tp, _Idx - 1>;
3821template <
typename _Tp>
3822 inline constexpr size_t extent_v<_Tp[], 0> = 0;
3823template <
typename _Tp,
unsigned _Idx>
3824 inline constexpr size_t extent_v<_Tp[], _Idx> = extent_v<_Tp, _Idx - 1>;
3826#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_same)
3827template <
typename _Tp,
typename _Up>
3828 inline constexpr bool is_same_v = __is_same(_Tp, _Up);
3830template <
typename _Tp,
typename _Up>
3831 inline constexpr bool is_same_v =
false;
3832template <
typename _Tp>
3833 inline constexpr bool is_same_v<_Tp, _Tp> =
true;
3835template <
typename _Base,
typename _Derived>
3836 inline constexpr bool is_base_of_v = __is_base_of(_Base, _Derived);
3837#ifdef __cpp_lib_is_virtual_base_of
3838template <
typename _Base,
typename _Derived>
3839 inline constexpr bool is_virtual_base_of_v = __builtin_is_virtual_base_of(_Base, _Derived);
3841#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_convertible)
3842template <
typename _From,
typename _To>
3843 inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
3845template <
typename _From,
typename _To>
3846 inline constexpr bool is_convertible_v = is_convertible<_From, _To>::value;
3848template<
typename _Fn,
typename... _Args>
3849 inline constexpr bool is_invocable_v
3850#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_invocable)
3851 = __is_invocable(_Fn, _Args...);
3853 = is_invocable<_Fn, _Args...>::value;
3855template<
typename _Fn,
typename... _Args>
3856 inline constexpr bool is_nothrow_invocable_v
3857#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_invocable)
3858 = __is_nothrow_invocable(_Fn, _Args...);
3860 = is_nothrow_invocable<_Fn, _Args...>::value;
3862template<
typename _Ret,
typename _Fn,
typename... _Args>
3863 inline constexpr bool is_invocable_r_v
3864 = is_invocable_r<_Ret, _Fn, _Args...>::value;
3865template<
typename _Ret,
typename _Fn,
typename... _Args>
3866 inline constexpr bool is_nothrow_invocable_r_v
3867 = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value;
3871#ifdef __cpp_lib_has_unique_object_representations
3874 template<typename _Tp>
3875 struct has_unique_object_representations
3876 : bool_constant<__has_unique_object_representations(
3877 remove_cv_t<remove_all_extents_t<_Tp>>
3880 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3881 "template argument must be a complete class or an unbounded array");
3884# if __cpp_lib_type_trait_variable_templates
3886 template<typename _Tp>
3887 inline constexpr bool has_unique_object_representations_v
3888 = has_unique_object_representations<_Tp>::value;
3892#ifdef __cpp_lib_is_aggregate
3895 template<typename _Tp>
3897 : bool_constant<__is_aggregate(remove_cv_t<_Tp>)>
3900# if __cpp_lib_type_trait_variable_templates
3905 template<
typename _Tp>
3906 inline constexpr bool is_aggregate_v = __is_aggregate(remove_cv_t<_Tp>);
3910#if __cpp_impl_reflection >= 202506L \
3911 && _GLIBCXX_USE_BUILTIN_TRAIT(__builtin_is_consteval_only)
3914 template<typename _Tp>
3915 struct is_consteval_only
3916 : bool_constant<__builtin_is_consteval_only(_Tp)>
3923 template<
typename _Tp>
3924 inline constexpr bool is_consteval_only_v
3925 = __builtin_is_consteval_only(_Tp);
3928#if __cpp_lib_is_structural >= 202603L
3931 template<typename _Tp>
3932 struct is_structural
3933 : bool_constant<__builtin_is_structural(_Tp)>
3940 template<
typename _Tp>
3941 inline constexpr bool is_structural_v
3942 = __builtin_is_structural(_Tp);
3949#ifdef __cpp_lib_remove_cvref
3950# if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_cvref)
3951 template<
typename _Tp>
3953 {
using type = __remove_cvref(_Tp); };
3955 template<
typename _Tp>
3957 {
using type =
typename remove_cv<_Tp>::type; };
3959 template<
typename _Tp>
3960 struct remove_cvref<_Tp&>
3961 {
using type =
typename remove_cv<_Tp>::type; };
3963 template<
typename _Tp>
3964 struct remove_cvref<_Tp&&>
3965 {
using type =
typename remove_cv<_Tp>::type; };
3968 template<
typename _Tp>
3969 using remove_cvref_t =
typename remove_cvref<_Tp>::type;
3973#ifdef __cpp_lib_type_identity
3978 template<
typename _Tp>
3979 struct type_identity {
using type = _Tp; };
3981 template<
typename _Tp>
3982 using type_identity_t =
typename type_identity<_Tp>::type;
3986#ifdef __cpp_lib_unwrap_ref
3991 template<
typename _Tp>
3992 struct unwrap_reference {
using type = _Tp; };
3994 template<
typename _Tp>
3997 template<
typename _Tp>
3998 using unwrap_reference_t =
typename unwrap_reference<_Tp>::type;
4005 template<
typename _Tp>
4006 struct unwrap_ref_decay {
using type = unwrap_reference_t<decay_t<_Tp>>; };
4008 template<
typename _Tp>
4009 using unwrap_ref_decay_t =
typename unwrap_ref_decay<_Tp>::type;
4013#ifdef __cpp_lib_bounded_array_traits
4017# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_bounded_array)
4018 template<
typename _Tp>
4019 inline constexpr bool is_bounded_array_v = __is_bounded_array(_Tp);
4021 template<
typename _Tp>
4022 inline constexpr bool is_bounded_array_v =
false;
4024 template<
typename _Tp,
size_t _Size>
4025 inline constexpr bool is_bounded_array_v<_Tp[_Size]> =
true;
4031# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_unbounded_array)
4032 template<
typename _Tp>
4033 inline constexpr bool is_unbounded_array_v = __is_unbounded_array(_Tp);
4035 template<
typename _Tp>
4036 inline constexpr bool is_unbounded_array_v =
false;
4038 template<
typename _Tp>
4039 inline constexpr bool is_unbounded_array_v<_Tp[]> =
true;
4044 template<
typename _Tp>
4045 struct is_bounded_array
4046 :
public bool_constant<is_bounded_array_v<_Tp>>
4051 template<
typename _Tp>
4052 struct is_unbounded_array
4053 :
public bool_constant<is_unbounded_array_v<_Tp>>
4057#if __has_builtin(__is_layout_compatible) && __cplusplus >= 202002L
4060 template<
typename _Tp,
typename _Up>
4062 : bool_constant<__is_layout_compatible(_Tp, _Up)>
4067 template<
typename _Tp,
typename _Up>
4069 = __is_layout_compatible(_Tp, _Up);
4071#if __has_builtin(__builtin_is_corresponding_member)
4072# ifndef __cpp_lib_is_layout_compatible
4073# error "libstdc++ bug: is_corresponding_member and is_layout_compatible are provided but their FTM is not set"
4077 template<
typename _S1,
typename _S2,
typename _M1,
typename _M2>
4080 {
return __builtin_is_corresponding_member(__m1, __m2); }
4084#if __has_builtin(__is_pointer_interconvertible_base_of) \
4085 && __cplusplus >= 202002L
4088 template<
typename _Base,
typename _Derived>
4090 : bool_constant<__is_pointer_interconvertible_base_of(_Base, _Derived)>
4095 template<
typename _Base,
typename _Derived>
4097 = __is_pointer_interconvertible_base_of(_Base, _Derived);
4099#if __has_builtin(__builtin_is_pointer_interconvertible_with_class)
4100# ifndef __cpp_lib_is_pointer_interconvertible
4101# error "libstdc++ bug: is_pointer_interconvertible available but FTM is not set"
4107 template<
typename _Tp,
typename _Mem>
4110 {
return __builtin_is_pointer_interconvertible_with_class(__mp); }
4114#ifdef __cpp_lib_is_scoped_enum
4118# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_scoped_enum)
4119 template<
typename _Tp>
4120 struct is_scoped_enum
4121 : bool_constant<__is_scoped_enum(_Tp)>
4124 template<
typename _Tp>
4125 struct is_scoped_enum
4129 template<
typename _Tp>
4130 requires __is_enum(_Tp)
4131 &&
requires(remove_cv_t<_Tp> __t) { __t = __t; }
4132 struct is_scoped_enum<_Tp>
4133 : bool_constant<!requires(_Tp __t, void(*__f)(int)) { __f(__t); }>
4139# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_scoped_enum)
4140 template<
typename _Tp>
4141 inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp);
4143 template<
typename _Tp>
4144 inline constexpr bool is_scoped_enum_v = is_scoped_enum<_Tp>::value;
4148#ifdef __cpp_lib_is_implicit_lifetime
4152 template<
typename _Tp>
4153 struct is_implicit_lifetime
4154 : bool_constant<__builtin_is_implicit_lifetime(_Tp)>
4159 template<
typename _Tp>
4160 inline constexpr bool is_implicit_lifetime_v
4161 = __builtin_is_implicit_lifetime(_Tp);
4164#ifdef __cpp_lib_reference_from_temporary
4169 template<typename _Tp, typename _Up>
4170 struct reference_constructs_from_temporary
4171 :
public bool_constant<__reference_constructs_from_temporary(_Tp, _Up)>
4173 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{})
4174 && std::__is_complete_or_unbounded(__type_identity<_Up>{}),
4175 "template argument must be a complete class or an unbounded array");
4182 template<
typename _Tp,
typename _Up>
4183 struct reference_converts_from_temporary
4184 :
public bool_constant<__reference_converts_from_temporary(_Tp, _Up)>
4186 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{})
4187 && std::__is_complete_or_unbounded(__type_identity<_Up>{}),
4188 "template argument must be a complete class or an unbounded array");
4193 template<
typename _Tp,
typename _Up>
4194 inline constexpr bool reference_constructs_from_temporary_v
4195 = reference_constructs_from_temporary<_Tp, _Up>::value;
4199 template<
typename _Tp,
typename _Up>
4200 inline constexpr bool reference_converts_from_temporary_v
4201 = reference_converts_from_temporary<_Tp, _Up>::value;
4204#ifdef __cpp_lib_is_constant_evaluated
4207 [[__gnu__::__always_inline__]]
4209 is_constant_evaluated() noexcept
4211#if __cpp_if_consteval >= 202106L
4212 if consteval {
return true; }
else {
return false; }
4214 return __builtin_is_constant_evaluated();
4219#if __cplusplus >= 202002L
4221 template<
typename _From,
typename _To>
4222 using __copy_cv =
typename __match_cv_qualifiers<_From, _To>::__type;
4224 template<
typename _Xp,
typename _Yp>
4228 template<
typename _Ap,
typename _Bp,
typename =
void>
4229 struct __common_ref_impl
4233 template<
typename _Ap,
typename _Bp>
4234 using __common_ref =
typename __common_ref_impl<_Ap, _Bp>::type;
4237 template<
typename _Xp,
typename _Yp>
4238 using __condres_cvref
4239 = __cond_res<__copy_cv<_Xp, _Yp>&, __copy_cv<_Yp, _Xp>&>;
4242 template<
typename _Xp,
typename _Yp>
4243 struct __common_ref_impl<_Xp&, _Yp&, __void_t<__condres_cvref<_Xp, _Yp>>>
4245 __condres_cvref<_Xp, _Yp>>
4249 template<
typename _Xp,
typename _Yp>
4253 template<
typename _Xp,
typename _Yp>
4254 struct __common_ref_impl<_Xp&&, _Yp&&,
4255 _Require<is_convertible<_Xp&&, __common_ref_C<_Xp, _Yp>>,
4256 is_convertible<_Yp&&, __common_ref_C<_Xp, _Yp>>>>
4257 {
using type = __common_ref_C<_Xp, _Yp>; };
4260 template<
typename _Xp,
typename _Yp>
4261 using __common_ref_D = __common_ref<const _Xp&, _Yp&>;
4264 template<
typename _Xp,
typename _Yp>
4265 struct __common_ref_impl<_Xp&&, _Yp&,
4266 _Require<is_convertible<_Xp&&, __common_ref_D<_Xp, _Yp>>>>
4267 {
using type = __common_ref_D<_Xp, _Yp>; };
4270 template<
typename _Xp,
typename _Yp>
4271 struct __common_ref_impl<_Xp&, _Yp&&>
4272 : __common_ref_impl<_Yp&&, _Xp&>
4276 template<
typename _Tp,
typename _Up,
4277 template<
typename>
class _TQual,
template<
typename>
class _UQual>
4278 struct basic_common_reference
4282 template<
typename _Tp>
4284 {
template<
typename _Up>
using __type = __copy_cv<_Tp, _Up>; };
4286 template<
typename _Tp>
4288 {
template<
typename _Up>
using __type = __copy_cv<_Tp, _Up>&; };
4290 template<
typename _Tp>
4291 struct __xref<_Tp&&>
4292 {
template<
typename _Up>
using __type = __copy_cv<_Tp, _Up>&&; };
4294 template<
typename _Tp1,
typename _Tp2>
4295 using __basic_common_ref
4296 =
typename basic_common_reference<remove_cvref_t<_Tp1>,
4297 remove_cvref_t<_Tp2>,
4298 __xref<_Tp1>::template __type,
4299 __xref<_Tp2>::template __type>::type;
4302 template<
typename... _Tp>
4303 struct common_reference;
4305 template<
typename... _Tp>
4310 struct common_reference<>
4314 template<
typename _Tp0>
4315 struct common_reference<_Tp0>
4316 {
using type = _Tp0; };
4319 template<
typename _Tp1,
typename _Tp2,
int _Bullet = 1>
4320 struct __common_reference_impl
4321 : __common_reference_impl<_Tp1, _Tp2, _Bullet + 1>
4325 template<
typename _Tp1,
typename _Tp2>
4326 struct common_reference<_Tp1, _Tp2>
4327 : __common_reference_impl<_Tp1, _Tp2>
4331 template<
typename _Tp1,
typename _Tp2>
4332 requires is_reference_v<_Tp1> && is_reference_v<_Tp2>
4333 &&
requires {
typename __common_ref<_Tp1, _Tp2>; }
4334#if __cpp_lib_common_reference
4335 && is_convertible_v<add_pointer_t<_Tp1>,
4337 && is_convertible_v<add_pointer_t<_Tp2>,
4340 struct __common_reference_impl<_Tp1, _Tp2, 1>
4341 {
using type = __common_ref<_Tp1, _Tp2>; };
4344 template<
typename _Tp1,
typename _Tp2>
4345 requires requires {
typename __basic_common_ref<_Tp1, _Tp2>; }
4346 struct __common_reference_impl<_Tp1, _Tp2, 2>
4347 {
using type = __basic_common_ref<_Tp1, _Tp2>; };
4350 template<
typename _Tp1,
typename _Tp2>
4351 requires requires {
typename __cond_res<_Tp1, _Tp2>; }
4352 struct __common_reference_impl<_Tp1, _Tp2, 3>
4353 {
using type = __cond_res<_Tp1, _Tp2>; };
4356 template<
typename _Tp1,
typename _Tp2>
4358 struct __common_reference_impl<_Tp1, _Tp2, 4>
4359 {
using type = common_type_t<_Tp1, _Tp2>; };
4362 template<
typename _Tp1,
typename _Tp2>
4363 struct __common_reference_impl<_Tp1, _Tp2, 5>
4367 template<
typename _Tp1,
typename _Tp2,
typename... _Rest>
4368 struct common_reference<_Tp1, _Tp2, _Rest...>
4369 : __common_type_fold<common_reference<_Tp1, _Tp2>,
4370 __common_type_pack<_Rest...>>
4374 template<
typename _Tp1,
typename _Tp2,
typename... _Rest>
4375 struct __common_type_fold<common_reference<_Tp1, _Tp2>,
4376 __common_type_pack<_Rest...>,
4378 :
public common_reference<common_reference_t<_Tp1, _Tp2>, _Rest...>
4384#if __cplusplus >= 201103L
4387 template<
size_t... _Indexes>
struct _Index_tuple { };
4390 template<
size_t _Num>
4391 struct _Build_index_tuple
4393#if __has_builtin(__make_integer_seq)
4394 template<
typename,
size_t... _Indices>
4395 using _IdxTuple = _Index_tuple<_Indices...>;
4398 using __type = __make_integer_seq<_IdxTuple, size_t, _Num>;
4401 using __type = _Index_tuple<__integer_pack(_Num)...>;
4406#ifdef __cpp_lib_constant_wrapper
4407 template<
typename _Tp>
4408 struct _CwFixedValue
4413 _CwFixedValue(__type __v) noexcept
4419 template<
typename _Tp,
size_t _Extent>
4420 struct _CwFixedValue<_Tp[_Extent]>
4422 using __type = _Tp[_Extent];
4425 _CwFixedValue(_Tp (&__arr)[_Extent]) noexcept
4426 : _CwFixedValue(__arr,
typename _Build_index_tuple<_Extent>::__type())
4429 template<
size_t... _Indices>
4431 _CwFixedValue(_Tp (&__arr)[_Extent], _Index_tuple<_Indices...>) noexcept
4432 : _M_data{__arr[_Indices]...}
4435 _Tp _M_data[_Extent];
4438 template<
typename _Tp,
size_t _Extent>
4439 _CwFixedValue(_Tp (&)[_Extent]) -> _CwFixedValue<_Tp[_Extent]>;
4441 template<_CwFixedValue _Xv,
4442 typename =
typename decltype(_CwFixedValue(_Xv))::__type>
4443 struct constant_wrapper;
4445 template<
typename _Tp>
4446 concept _ConstExprParam =
requires
4448 typename constant_wrapper<_Tp::value>;
4453 template<_ConstExprParam _Tp>
4454 friend constexpr auto
4455 operator+(_Tp)
noexcept -> constant_wrapper<(+_Tp::value)>
4458 template<_ConstExprParam _Tp>
4459 friend constexpr auto
4460 operator-(_Tp)
noexcept -> constant_wrapper<(-_Tp::value)>
4463 template<_ConstExprParam _Tp>
4464 friend constexpr auto
4465 operator~(_Tp)
noexcept -> constant_wrapper<(~_Tp::value)>
4468 template<_ConstExprParam _Tp>
4469 friend constexpr auto
4470 operator!(_Tp)
noexcept -> constant_wrapper<(!_Tp::value)>
4473 template<_ConstExprParam _Tp>
4474 friend constexpr auto
4475 operator&(_Tp)
noexcept -> constant_wrapper<(&_Tp::value)>
4478 template<_ConstExprParam _Tp>
4479 friend constexpr auto
4480 operator*(_Tp)
noexcept -> constant_wrapper<(*_Tp::value)>
4483 template<_ConstExprParam _Left, _ConstExprParam _Right>
4484 friend constexpr auto
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
4509 operator%(_Left, _Right)
noexcept
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 friend constexpr auto
4522 -> constant_wrapper<(_Left::value >> _Right::value)>
4525 template<_ConstExprParam _Left, _ConstExprParam _Right>
4526 friend constexpr auto
4528 -> constant_wrapper<(_Left::value & _Right::value)>
4531 template<_ConstExprParam _Left, _ConstExprParam _Right>
4532 friend constexpr auto
4534 -> constant_wrapper<(_Left::value | _Right::value)>
4537 template<_ConstExprParam _Left, _ConstExprParam _Right>
4538 friend constexpr auto
4540 -> constant_wrapper<(_Left::value ^ _Right::value)>
4543 template<_ConstExprParam _Left, _ConstExprParam _Right>
4544 requires (!is_constructible_v<bool,
decltype(_Left::value)>
4545 || !is_constructible_v<bool,
decltype(_Right::value)>)
4546 friend constexpr auto
4547 operator&&(_Left, _Right)
noexcept
4548 -> constant_wrapper<(_Left::value && _Right::value)>
4551 template<_ConstExprParam _Left, _ConstExprParam _Right>
4552 requires (!is_constructible_v<bool,
decltype(_Left::value)>
4553 || !is_constructible_v<bool,
decltype(_Right::value)>)
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
4580 -> constant_wrapper<(_Left::value == _Right::value)>
4583 template<_ConstExprParam _Left, _ConstExprParam _Right>
4584 friend constexpr auto
4585 operator!=(_Left, _Right)
noexcept
4586 -> constant_wrapper<(_Left::value != _Right::value)>
4589 template<_ConstExprParam _Left, _ConstExprParam _Right>
4590 friend constexpr auto
4591 operator>(_Left, _Right)
noexcept
4592 -> constant_wrapper<(_Left::value > _Right::value)>
4595 template<_ConstExprParam _Left, _ConstExprParam _Right>
4596 friend constexpr auto
4597 operator>=(_Left, _Right)
noexcept
4598 -> constant_wrapper<(_Left::value >= _Right::value)>
4601 template<_ConstExprParam _Left, _ConstExprParam _Right>
4602 friend constexpr auto
4603 operator,(_Left, _Right)
noexcept =
delete;
4605 template<_ConstExprParam _Left, _ConstExprParam _Right>
4606 friend constexpr auto
4607 operator->*(_Left, _Right)
noexcept
4608 -> constant_wrapper<_Left::value->*(_Right::value)>
4611 template<_ConstExprParam _Tp, _ConstExprParam... _Args>
4613 operator()(
this _Tp, _Args...) noexcept
4615 requires(_Args...) { constant_wrapper<_Tp::value(_Args::value...)>(); }
4616 {
return constant_wrapper<_Tp::value(_Args::value...)>{}; }
4618 template<_ConstExprParam _Tp, _ConstExprParam... _Args>
4620 operator[](
this _Tp, _Args...) noexcept
4621 -> constant_wrapper<(_Tp::value[_Args::value...])>
4624 template<_ConstExprParam _Tp>
4626 operator++(
this _Tp)
noexcept
4627 -> constant_wrapper<(++_Tp::value)>
4630 template<_ConstExprParam _Tp>
4632 operator++(
this _Tp,
int)
noexcept
4633 -> constant_wrapper<(_Tp::value++)>
4636 template<_ConstExprParam _Tp>
4638 operator--(
this _Tp)
noexcept
4639 -> constant_wrapper<(--_Tp::value)>
4642 template<_ConstExprParam _Tp>
4644 operator--(
this _Tp,
int)
noexcept
4645 -> constant_wrapper<(_Tp::value--)>
4648 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4650 operator+=(
this _Tp, _Right)
noexcept
4651 -> constant_wrapper<(_Tp::value += _Right::value)>
4654 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4656 operator-=(
this _Tp, _Right)
noexcept
4657 -> constant_wrapper<(_Tp::value -= _Right::value)>
4660 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4662 operator*=(
this _Tp, _Right)
noexcept
4663 -> constant_wrapper<(_Tp::value *= _Right::value)>
4666 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4668 operator/=(
this _Tp, _Right)
noexcept
4669 -> constant_wrapper<(_Tp::value /= _Right::value)>
4672 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4674 operator%=(
this _Tp, _Right)
noexcept
4675 -> constant_wrapper<(_Tp::value %= _Right::value)>
4678 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4680 operator&=(
this _Tp, _Right)
noexcept
4681 -> constant_wrapper<(_Tp::value &= _Right::value)>
4684 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4686 operator|=(
this _Tp, _Right)
noexcept
4687 -> constant_wrapper<(_Tp::value |= _Right::value)>
4690 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4692 operator^=(
this _Tp, _Right)
noexcept
4693 -> constant_wrapper<(_Tp::value ^= _Right::value)>
4696 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4698 operator<<=(
this _Tp, _Right)
noexcept
4699 -> constant_wrapper<(_Tp::value <<= _Right::value)>
4702 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4704 operator>>=(
this _Tp, _Right)
noexcept
4705 -> constant_wrapper<(_Tp::value >>= _Right::value)>
4709 template<_CwFixedValue _Xv,
typename>
4710 struct constant_wrapper : _CwOperators
4712 static constexpr const auto& value = _Xv._M_data;
4713 using type = constant_wrapper;
4714 using value_type =
typename decltype(_Xv)::__type;
4716 template<_ConstExprParam _Right>
4718 operator=(_Right)
const noexcept
4719 -> constant_wrapper<(value = _Right::value)>
4723 operator decltype(value)()
const noexcept
4727 template<_CwFixedValue _Tp>
4728 constexpr auto cw = constant_wrapper<_Tp>{};
4733_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