29#ifndef _GLIBCXX_TYPE_TRAITS
30#define _GLIBCXX_TYPE_TRAITS 1
33#pragma GCC system_header
36#if __cplusplus < 201103L
42#define __glibcxx_want_bool_constant
43#define __glibcxx_want_bounded_array_traits
44#define __glibcxx_want_common_reference
45#define __glibcxx_want_constant_wrapper
46#define __glibcxx_want_has_unique_object_representations
47#define __glibcxx_want_integral_constant_callable
48#define __glibcxx_want_is_aggregate
49#define __glibcxx_want_is_constant_evaluated
50#define __glibcxx_want_is_final
51#define __glibcxx_want_is_implicit_lifetime
52#define __glibcxx_want_is_invocable
53#define __glibcxx_want_is_layout_compatible
54#define __glibcxx_want_is_nothrow_convertible
55#define __glibcxx_want_is_null_pointer
56#define __glibcxx_want_is_pointer_interconvertible
57#define __glibcxx_want_is_scoped_enum
58#define __glibcxx_want_is_swappable
59#define __glibcxx_want_is_virtual_base_of
60#define __glibcxx_want_logical_traits
61#define __glibcxx_want_reference_from_temporary
62#define __glibcxx_want_remove_cvref
63#define __glibcxx_want_result_of_sfinae
64#define __glibcxx_want_transformation_trait_aliases
65#define __glibcxx_want_type_identity
66#define __glibcxx_want_type_trait_variable_templates
67#define __glibcxx_want_unwrap_ref
68#define __glibcxx_want_void_t
73namespace std _GLIBCXX_VISIBILITY(default)
75_GLIBCXX_BEGIN_NAMESPACE_VERSION
77 template<
typename _Tp>
94 template<
typename _Tp, _Tp __v>
97 static constexpr _Tp value = __v;
98 using value_type = _Tp;
100 constexpr operator value_type()
const noexcept {
return value; }
102#ifdef __cpp_lib_integral_constant_callable
103 constexpr value_type operator()()
const noexcept {
return value; }
107#if ! __cpp_inline_variables
108 template<
typename _Tp, _Tp __v>
109 constexpr _Tp integral_constant<_Tp, __v>::value;
124#ifdef __cpp_lib_bool_constant
128 using bool_constant = __bool_constant<__v>;
135 template<
bool,
typename _Tp =
void>
140 template<
typename _Tp>
142 {
using type = _Tp; };
145 template<
bool _Cond,
typename _Tp =
void>
146 using __enable_if_t =
typename enable_if<_Cond, _Tp>::type;
151 template<
typename _Tp,
typename>
156 struct __conditional<false>
158 template<
typename,
typename _Up>
163 template<
bool _Cond,
typename _If,
typename _Else>
164 using __conditional_t
168 template <
typename _Type>
169 struct __type_identity
170 {
using type = _Type; };
172 template<
typename _Tp>
173 using __type_identity_t =
typename __type_identity<_Tp>::type;
178 template<
typename _Tp,
typename...>
179 using __first_t = _Tp;
182 template<
typename... _Bn>
184 __enable_if_t<!bool(_Bn::value)>...>;
186 template<
typename... _Bn>
189 template<
typename... _Bn>
190 auto __and_fn(
int) -> __first_t<
true_type,
191 __enable_if_t<bool(_Bn::value)>...>;
193 template<
typename... _Bn>
200 template<
typename... _Bn>
202 : decltype(__detail::__or_fn<_Bn...>(0))
205 template<
typename... _Bn>
207 : decltype(__detail::__and_fn<_Bn...>(0))
210 template<
typename _Pp>
212 : __bool_constant<!bool(_Pp::value)>
216#ifdef __cpp_lib_logical_traits
219 template<
typename... _Bn>
220 inline constexpr bool __or_v = __or_<_Bn...>::value;
221 template<
typename... _Bn>
222 inline constexpr bool __and_v = __and_<_Bn...>::value;
226 template<
typename ,
typename _B1,
typename... _Bn>
227 struct __disjunction_impl
228 {
using type = _B1; };
230 template<
typename _B1,
typename _B2,
typename... _Bn>
231 struct __disjunction_impl<__enable_if_t<!bool(_B1::value)>, _B1, _B2, _Bn...>
232 {
using type =
typename __disjunction_impl<void, _B2, _Bn...>::type; };
234 template<
typename ,
typename _B1,
typename... _Bn>
235 struct __conjunction_impl
236 {
using type = _B1; };
238 template<
typename _B1,
typename _B2,
typename... _Bn>
239 struct __conjunction_impl<__enable_if_t<bool(_B1::value)>, _B1, _B2, _Bn...>
240 {
using type =
typename __conjunction_impl<void, _B2, _Bn...>::type; };
244 template<
typename... _Bn>
246 : __detail::__conjunction_impl<void, _Bn...>::type
254 template<
typename... _Bn>
256 : __detail::__disjunction_impl<void, _Bn...>::type
264 template<
typename _Pp>
272 template<
typename... _Bn>
273 inline constexpr bool conjunction_v = conjunction<_Bn...>::value;
275 template<
typename... _Bn>
276 inline constexpr bool disjunction_v = disjunction<_Bn...>::value;
278 template<
typename _Pp>
279 inline constexpr bool negation_v = negation<_Pp>::value;
294 struct __is_array_unknown_bounds;
299 template<
typename _Tp>
300 using __maybe_complete_object_type
301 = __and_<is_object<_Tp>, __not_<__is_array_unknown_bounds<_Tp>>>;
307 template<
typename _Tp,
308 typename = __enable_if_t<__maybe_complete_object_type<_Tp>::value>,
309 size_t =
sizeof(_Tp)>
311 __is_complete_or_unbounded(__type_identity<_Tp>)
316 template<
typename _TypeIdentity,
317 typename _NestedType =
typename _TypeIdentity::type>
318 constexpr typename __not_<__maybe_complete_object_type<_NestedType>>::type
319 __is_complete_or_unbounded(_TypeIdentity)
323 template<
typename _Tp>
324 using __remove_cv_t =
typename remove_cv<_Tp>::type;
330 template<
typename _Tp>
339 struct is_void<const void>
340 :
public true_type { };
347 struct is_void<const volatile void>
352 struct __is_integral_helper
356 struct __is_integral_helper<bool>
360 struct __is_integral_helper<char>
364 struct __is_integral_helper<signed char>
368 struct __is_integral_helper<unsigned char>
375 struct __is_integral_helper<wchar_t>
378#ifdef _GLIBCXX_USE_CHAR8_T
380 struct __is_integral_helper<char8_t>
385 struct __is_integral_helper<char16_t>
389 struct __is_integral_helper<char32_t>
393 struct __is_integral_helper<short>
397 struct __is_integral_helper<unsigned short>
401 struct __is_integral_helper<int>
405 struct __is_integral_helper<unsigned int>
409 struct __is_integral_helper<long>
413 struct __is_integral_helper<unsigned long>
417 struct __is_integral_helper<long long>
421 struct __is_integral_helper<unsigned long long>
426#if defined(__GLIBCXX_TYPE_INT_N_0)
429 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_0>
434 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_0>
437#if defined(__GLIBCXX_TYPE_INT_N_1)
440 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_1>
445 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_1>
448#if defined(__GLIBCXX_TYPE_INT_N_2)
451 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_2>
456 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_2>
459#if defined(__GLIBCXX_TYPE_INT_N_3)
462 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_3>
467 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_3>
471#if defined __SIZEOF_INT128__ && defined __STRICT_ANSI__
474 struct __is_integral_helper<__int128>
479 struct __is_integral_helper<unsigned __int128>
486 template<
typename _Tp>
488 :
public __is_integral_helper<__remove_cv_t<_Tp>>
::type
493 struct __is_floating_point_helper
497 struct __is_floating_point_helper<float>
498 :
public true_type { };
501 struct __is_floating_point_helper<double>
505 struct __is_floating_point_helper<long double>
508#ifdef __STDCPP_FLOAT16_T__
510 struct __is_floating_point_helper<_Float16>
514#ifdef __STDCPP_FLOAT32_T__
516 struct __is_floating_point_helper<_Float32>
520#ifdef __STDCPP_FLOAT64_T__
522 struct __is_floating_point_helper<_Float64>
526#ifdef __STDCPP_FLOAT128_T__
528 struct __is_floating_point_helper<_Float128>
532#ifdef __STDCPP_BFLOAT16_T__
534 struct __is_floating_point_helper<__gnu_cxx::__bfloat16_t>
538#ifdef _GLIBCXX_USE_FLOAT128
540 struct __is_floating_point_helper<__float128>
546 template<
typename _Tp>
548 :
public __is_floating_point_helper<__remove_cv_t<_Tp>>
::type
552#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_array)
553 template<
typename _Tp>
555 :
public __bool_constant<__is_array(_Tp)>
562 template<
typename _Tp, std::
size_t _Size>
563 struct is_array<_Tp[_Size]>
564 :
public true_type { };
566 template<
typename _Tp>
572#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_pointer)
573 template<
typename _Tp>
575 :
public __bool_constant<__is_pointer(_Tp)>
578 template<
typename _Tp>
582 template<
typename _Tp>
583 struct is_pointer<_Tp*>
584 :
public true_type { };
586 template<
typename _Tp>
590 template<
typename _Tp>
594 template<
typename _Tp>
604 template<
typename _Tp>
613 template<
typename _Tp>
618#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_object_pointer)
619 template<
typename _Tp>
621 :
public __bool_constant<__is_member_object_pointer(_Tp)>
625 struct __is_member_object_pointer_helper
628 template<
typename _Tp,
typename _Cp>
629 struct __is_member_object_pointer_helper<_Tp _Cp::*>
630 :
public __not_<is_function<_Tp>>::type { };
633 template<
typename _Tp>
635 :
public __is_member_object_pointer_helper<__remove_cv_t<_Tp>>::type
639#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_function_pointer)
641 template<
typename _Tp>
643 :
public __bool_constant<__is_member_function_pointer(_Tp)>
647 struct __is_member_function_pointer_helper
650 template<
typename _Tp,
typename _Cp>
651 struct __is_member_function_pointer_helper<_Tp _Cp::*>
652 :
public is_function<_Tp>::type { };
655 template<
typename _Tp>
657 :
public __is_member_function_pointer_helper<__remove_cv_t<_Tp>>::type
662 template<
typename _Tp>
664 :
public __bool_constant<__is_enum(_Tp)>
668 template<
typename _Tp>
670 :
public __bool_constant<__is_union(_Tp)>
674 template<
typename _Tp>
676 :
public __bool_constant<__is_class(_Tp)>
680#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_function)
681 template<
typename _Tp>
683 :
public __bool_constant<__is_function(_Tp)>
686 template<
typename _Tp>
688 :
public __bool_constant<!is_const<const _Tp>::value> { };
690 template<
typename _Tp>
691 struct is_function<_Tp&>
692 :
public false_type { };
694 template<
typename _Tp>
699#ifdef __cpp_lib_is_null_pointer
701 template<typename _Tp>
702 struct is_null_pointer
706 struct is_null_pointer<std::nullptr_t>
710 struct is_null_pointer<const std::nullptr_t>
714 struct is_null_pointer<volatile std::nullptr_t>
718 struct is_null_pointer<const volatile std::nullptr_t>
723 template<
typename _Tp>
724 struct __is_nullptr_t
725 :
public is_null_pointer<_Tp>
726 { } _GLIBCXX_DEPRECATED_SUGGEST(
"std::is_null_pointer");
732#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_reference)
733 template<
typename _Tp>
735 :
public __bool_constant<__is_reference(_Tp)>
738 template<
typename _Tp>
743 template<
typename _Tp>
744 struct is_reference<_Tp&>
748 template<
typename _Tp>
755 template<
typename _Tp>
757 :
public __or_<is_integral<_Tp>, is_floating_point<_Tp>>
::type
761 template<
typename _Tp>
763 :
public __or_<is_arithmetic<_Tp>, is_void<_Tp>,
764 is_null_pointer<_Tp>>
::type
768#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_object)
769 template<
typename _Tp>
771 :
public __bool_constant<__is_object(_Tp)>
774 template<
typename _Tp>
776 :
public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
782 struct is_member_pointer;
785 template<
typename _Tp>
787 :
public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
788 is_member_pointer<_Tp>, is_null_pointer<_Tp>>
::type
792 template<
typename _Tp>
794 :
public __bool_constant<!is_fundamental<_Tp>::value> { };
797#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_pointer)
798 template<
typename _Tp>
800 :
public __bool_constant<__is_member_pointer(_Tp)>
804 template<
typename _Tp>
805 struct __is_member_pointer_helper
808 template<
typename _Tp,
typename _Cp>
809 struct __is_member_pointer_helper<_Tp _Cp::*>
810 :
public true_type { };
813 template<
typename _Tp>
815 :
public __is_member_pointer_helper<__remove_cv_t<_Tp>>::type
819 template<
typename,
typename>
823 template<
typename _Tp,
typename... _Types>
824 using __is_one_of = __or_<is_same<_Tp, _Types>...>;
828 template<
typename _Tp>
829 using __is_signed_integer = __is_one_of<__remove_cv_t<_Tp>,
830 signed char,
signed short,
signed int,
signed long,
832#if defined(__GLIBCXX_TYPE_INT_N_0)
833 ,
signed __GLIBCXX_TYPE_INT_N_0
835#if defined(__GLIBCXX_TYPE_INT_N_1)
836 ,
signed __GLIBCXX_TYPE_INT_N_1
838#if defined(__GLIBCXX_TYPE_INT_N_2)
839 ,
signed __GLIBCXX_TYPE_INT_N_2
841#if defined(__GLIBCXX_TYPE_INT_N_3)
842 ,
signed __GLIBCXX_TYPE_INT_N_3
848 template<
typename _Tp>
849 using __is_unsigned_integer = __is_one_of<__remove_cv_t<_Tp>,
850 unsigned char,
unsigned short,
unsigned int,
unsigned long,
852#if defined(__GLIBCXX_TYPE_INT_N_0)
853 ,
unsigned __GLIBCXX_TYPE_INT_N_0
855#if defined(__GLIBCXX_TYPE_INT_N_1)
856 ,
unsigned __GLIBCXX_TYPE_INT_N_1
858#if defined(__GLIBCXX_TYPE_INT_N_2)
859 ,
unsigned __GLIBCXX_TYPE_INT_N_2
861#if defined(__GLIBCXX_TYPE_INT_N_3)
862 ,
unsigned __GLIBCXX_TYPE_INT_N_3
867 template<
typename _Tp>
868 using __is_standard_integer
869 = __or_<__is_signed_integer<_Tp>, __is_unsigned_integer<_Tp>>;
872 template<
typename...>
using __void_t = void;
878#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_const)
879 template<
typename _Tp>
881 :
public __bool_constant<__is_const(_Tp)>
888 template<
typename _Tp>
889 struct is_const<_Tp const>
890 :
public true_type { };
894#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_volatile)
895 template<
typename _Tp>
897 :
public __bool_constant<__is_volatile(_Tp)>
904 template<
typename _Tp>
905 struct is_volatile<_Tp volatile>
906 :
public true_type { };
916 template<
typename _Tp>
918 _GLIBCXX26_DEPRECATED_SUGGEST(
"is_trivially_default_constructible && is_trivially_copyable")
920 : public __bool_constant<__is_trivial(_Tp)>
922 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
923 "template argument must be a complete class or an unbounded array");
927 template<
typename _Tp>
929 :
public __bool_constant<__is_trivially_copyable(_Tp)>
931 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
932 "template argument must be a complete class or an unbounded array");
936 template<
typename _Tp>
938 :
public __bool_constant<__is_standard_layout(_Tp)>
940 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
941 "template argument must be a complete class or an unbounded array");
949 template<
typename _Tp>
951 _GLIBCXX20_DEPRECATED_SUGGEST(
"is_standard_layout && is_trivial")
953 : public __bool_constant<__is_pod(_Tp)>
955 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
956 "template argument must be a complete class or an unbounded array");
963 template<
typename _Tp>
965 _GLIBCXX17_DEPRECATED
967 :
public __bool_constant<__is_literal_type(_Tp)>
969 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
970 "template argument must be a complete class or an unbounded array");
974 template<
typename _Tp>
976 :
public __bool_constant<__is_empty(_Tp)>
980 template<
typename _Tp>
982 :
public __bool_constant<__is_polymorphic(_Tp)>
985#ifdef __cpp_lib_is_final
988 template<typename _Tp>
990 :
public __bool_constant<__is_final(_Tp)>
995 template<
typename _Tp>
997 :
public __bool_constant<__is_abstract(_Tp)>
1001 template<
typename _Tp,
1003 struct __is_signed_helper
1006 template<
typename _Tp>
1007 struct __is_signed_helper<_Tp, true>
1008 :
public __bool_constant<_Tp(-1) < _Tp(0)>
1013 template<typename _Tp>
1015 : public __is_signed_helper<_Tp>::type
1019 template<typename _Tp>
1021 : public __and_<is_arithmetic<_Tp>, __not_<is_signed<_Tp>>>::type
1025 template<typename _Tp, typename _Up = _Tp&&>
1029 template<typename _Tp>
1034 template<typename _Tp>
1035 auto declval() noexcept -> decltype(__declval<_Tp>(0));
1041 template<typename _Tp>
1042 struct __is_array_known_bounds
1046 template<
typename _Tp,
size_t _Size>
1047 struct __is_array_known_bounds<_Tp[_Size]>
1051 template<
typename _Tp>
1052 struct __is_array_unknown_bounds
1056 template<
typename _Tp>
1057 struct __is_array_unknown_bounds<_Tp[]>
1064#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_destructible)
1066 template<
typename _Tp>
1068 :
public __bool_constant<__is_destructible(_Tp)>
1078 struct __do_is_destructible_impl
1080 template<typename _Tp, typename = decltype(declval<_Tp&>().~_Tp())>
1087 template<
typename _Tp>
1088 struct __is_destructible_impl
1089 :
public __do_is_destructible_impl
1091 using type =
decltype(__test<_Tp>(0));
1094 template<
typename _Tp,
1095 bool = __or_<is_void<_Tp>,
1096 __is_array_unknown_bounds<_Tp>,
1099 struct __is_destructible_safe;
1101 template<
typename _Tp>
1102 struct __is_destructible_safe<_Tp, false, false>
1103 :
public __is_destructible_impl<typename
1104 remove_all_extents<_Tp>::type>::type
1107 template<
typename _Tp>
1108 struct __is_destructible_safe<_Tp, true, false>
1111 template<
typename _Tp>
1112 struct __is_destructible_safe<_Tp, false, true>
1117 template<
typename _Tp>
1119 :
public __is_destructible_safe<_Tp>::type
1121 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1122 "template argument must be a complete class or an unbounded array");
1126#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_destructible)
1128 template<
typename _Tp>
1130 :
public __bool_constant<__is_nothrow_destructible(_Tp)>
1139 struct __do_is_nt_destructible_impl
1141 template<
typename _Tp>
1142 static __bool_constant<noexcept(declval<_Tp&>().~_Tp())>
1149 template<
typename _Tp>
1150 struct __is_nt_destructible_impl
1151 :
public __do_is_nt_destructible_impl
1153 using type =
decltype(__test<_Tp>(0));
1156 template<
typename _Tp,
1157 bool = __or_<is_void<_Tp>,
1158 __is_array_unknown_bounds<_Tp>,
1161 struct __is_nt_destructible_safe;
1163 template<
typename _Tp>
1164 struct __is_nt_destructible_safe<_Tp, false, false>
1165 :
public __is_nt_destructible_impl<typename
1166 remove_all_extents<_Tp>::type>::type
1169 template<
typename _Tp>
1170 struct __is_nt_destructible_safe<_Tp, true, false>
1173 template<
typename _Tp>
1174 struct __is_nt_destructible_safe<_Tp, false, true>
1179 template<
typename _Tp>
1181 :
public __is_nt_destructible_safe<_Tp>::type
1183 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1184 "template argument must be a complete class or an unbounded array");
1189 template<
typename _Tp,
typename... _Args>
1190 using __is_constructible_impl
1191 = __bool_constant<__is_constructible(_Tp, _Args...)>;
1195 template<
typename _Tp,
typename... _Args>
1197 :
public __is_constructible_impl<_Tp, _Args...>
1199 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1200 "template argument must be a complete class or an unbounded array");
1204 template<
typename _Tp>
1206 :
public __is_constructible_impl<_Tp>
1208 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1209 "template argument must be a complete class or an unbounded array");
1213#if _GLIBCXX_USE_BUILTIN_TRAIT(__add_lvalue_reference)
1214 template<
typename _Tp>
1215 using __add_lval_ref_t = __add_lvalue_reference(_Tp);
1217 template<
typename _Tp,
typename =
void>
1218 struct __add_lvalue_reference_helper
1219 {
using type = _Tp; };
1221 template<
typename _Tp>
1222 struct __add_lvalue_reference_helper<_Tp, __void_t<_Tp&>>
1223 {
using type = _Tp&; };
1225 template<
typename _Tp>
1226 using __add_lval_ref_t =
typename __add_lvalue_reference_helper<_Tp>::type;
1231 template<
typename _Tp>
1233 :
public __is_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>>
1235 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1236 "template argument must be a complete class or an unbounded array");
1240#if _GLIBCXX_USE_BUILTIN_TRAIT(__add_rvalue_reference)
1241 template<
typename _Tp>
1242 using __add_rval_ref_t = __add_rvalue_reference(_Tp);
1244 template<
typename _Tp,
typename =
void>
1245 struct __add_rvalue_reference_helper
1246 {
using type = _Tp; };
1248 template<
typename _Tp>
1249 struct __add_rvalue_reference_helper<_Tp, __void_t<_Tp&&>>
1250 {
using type = _Tp&&; };
1252 template<
typename _Tp>
1253 using __add_rval_ref_t =
typename __add_rvalue_reference_helper<_Tp>::type;
1258 template<
typename _Tp>
1260 :
public __is_constructible_impl<_Tp, __add_rval_ref_t<_Tp>>
1262 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1263 "template argument must be a complete class or an unbounded array");
1267 template<
typename _Tp,
typename... _Args>
1268 using __is_nothrow_constructible_impl
1269 = __bool_constant<__is_nothrow_constructible(_Tp, _Args...)>;
1273 template<
typename _Tp,
typename... _Args>
1275 :
public __is_nothrow_constructible_impl<_Tp, _Args...>
1277 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1278 "template argument must be a complete class or an unbounded array");
1282 template<
typename _Tp>
1284 :
public __is_nothrow_constructible_impl<_Tp>
1286 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1287 "template argument must be a complete class or an unbounded array");
1291 template<
typename _Tp>
1293 :
public __is_nothrow_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>>
1295 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1296 "template argument must be a complete class or an unbounded array");
1300 template<
typename _Tp>
1302 :
public __is_nothrow_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 _Up>
1310 using __is_assignable_impl = __bool_constant<__is_assignable(_Tp, _Up)>;
1314 template<
typename _Tp,
typename _Up>
1316 :
public __is_assignable_impl<_Tp, _Up>
1318 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1319 "template argument must be a complete class or an unbounded array");
1323 template<
typename _Tp>
1325 :
public __is_assignable_impl<__add_lval_ref_t<_Tp>,
1326 __add_lval_ref_t<const _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_assignable_impl<__add_lval_ref_t<_Tp>, __add_rval_ref_t<_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,
typename _Up>
1343 using __is_nothrow_assignable_impl
1344 = __bool_constant<__is_nothrow_assignable(_Tp, _Up)>;
1348 template<
typename _Tp,
typename _Up>
1350 :
public __is_nothrow_assignable_impl<_Tp, _Up>
1352 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1353 "template argument must be a complete class or an unbounded array");
1357 template<
typename _Tp>
1359 :
public __is_nothrow_assignable_impl<__add_lval_ref_t<_Tp>,
1360 __add_lval_ref_t<const _Tp>>
1362 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1363 "template argument must be a complete class or an unbounded array");
1367 template<
typename _Tp>
1369 :
public __is_nothrow_assignable_impl<__add_lval_ref_t<_Tp>,
1370 __add_rval_ref_t<_Tp>>
1372 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1373 "template argument must be a complete class or an unbounded array");
1377 template<
typename _Tp,
typename... _Args>
1378 using __is_trivially_constructible_impl
1379 = __bool_constant<__is_trivially_constructible(_Tp, _Args...)>;
1383 template<
typename _Tp,
typename... _Args>
1385 :
public __is_trivially_constructible_impl<_Tp, _Args...>
1387 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1388 "template argument must be a complete class or an unbounded array");
1392 template<
typename _Tp>
1394 :
public __is_trivially_constructible_impl<_Tp>
1396 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1397 "template argument must be a complete class or an unbounded array");
1400#if __cpp_variable_templates && __cpp_concepts
1401 template<
typename _Tp>
1402 constexpr bool __is_implicitly_default_constructible_v
1403 =
requires (void(&__f)(_Tp)) { __f({}); };
1405 template<
typename _Tp>
1406 struct __is_implicitly_default_constructible
1407 : __bool_constant<__is_implicitly_default_constructible_v<_Tp>>
1410 struct __do_is_implicitly_default_constructible_impl
1412 template <
typename _Tp>
1413 static void __helper(
const _Tp&);
1415 template <
typename _Tp>
1417 decltype(__helper<const _Tp&>({}))* = 0);
1422 template<
typename _Tp>
1423 struct __is_implicitly_default_constructible_impl
1424 :
public __do_is_implicitly_default_constructible_impl
1429 template<
typename _Tp>
1430 struct __is_implicitly_default_constructible_safe
1431 :
public __is_implicitly_default_constructible_impl<_Tp>::type
1434 template <
typename _Tp>
1435 struct __is_implicitly_default_constructible
1436 :
public __and_<__is_constructible_impl<_Tp>,
1437 __is_implicitly_default_constructible_safe<_Tp>>::type
1442 template<
typename _Tp>
1444 :
public __is_trivially_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>>
1446 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1447 "template argument must be a complete class or an unbounded array");
1451 template<
typename _Tp>
1453 :
public __is_trivially_constructible_impl<_Tp, __add_rval_ref_t<_Tp>>
1455 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1456 "template argument must be a complete class or an unbounded array");
1460 template<
typename _Tp,
typename _Up>
1461 using __is_trivially_assignable_impl
1462 = __bool_constant<__is_trivially_assignable(_Tp, _Up)>;
1466 template<
typename _Tp,
typename _Up>
1468 :
public __is_trivially_assignable_impl<_Tp, _Up>
1470 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1471 "template argument must be a complete class or an unbounded array");
1475 template<
typename _Tp>
1477 :
public __is_trivially_assignable_impl<__add_lval_ref_t<_Tp>,
1478 __add_lval_ref_t<const _Tp>>
1480 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1481 "template argument must be a complete class or an unbounded array");
1485 template<
typename _Tp>
1487 :
public __is_trivially_assignable_impl<__add_lval_ref_t<_Tp>,
1488 __add_rval_ref_t<_Tp>>
1490 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1491 "template argument must be a complete class or an unbounded array");
1494#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_trivially_destructible)
1496 template<
typename _Tp>
1498 :
public __bool_constant<__is_trivially_destructible(_Tp)>
1502 template<
typename _Tp>
1504 :
public __and_<__is_destructible_safe<_Tp>,
1505 __bool_constant<__has_trivial_destructor(_Tp)>>
::type
1507 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1508 "template argument must be a complete class or an unbounded array");
1513 template<
typename _Tp>
1515 :
public __bool_constant<__has_virtual_destructor(_Tp)>
1517 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1518 "template argument must be a complete class or an unbounded array");
1525 template<
typename _Tp>
1529 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1530 "template argument must be a complete class or an unbounded array");
1534#if _GLIBCXX_USE_BUILTIN_TRAIT(__array_rank) \
1535 && (!defined(__clang__) || __clang_major__ >= 20)
1536 template<
typename _Tp>
1544 template<
typename _Tp, std::
size_t _Size>
1545 struct rank<_Tp[_Size]>
1546 :
public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
1548 template<
typename _Tp>
1554 template<
typename,
unsigned _U
int = 0>
1558 template<
typename _Tp,
size_t _Size>
1559 struct extent<_Tp[_Size], 0>
1562 template<
typename _Tp,
unsigned _U
int,
size_t _Size>
1563 struct extent<_Tp[_Size], _Uint>
1564 :
public extent<_Tp, _Uint - 1>::type { };
1566 template<
typename _Tp>
1570 template<
typename _Tp,
unsigned _U
int>
1571 struct extent<_Tp[], _Uint>
1572 :
public extent<_Tp, _Uint - 1>::type { };
1578#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_same)
1579 template<
typename _Tp,
typename _Up>
1581 :
public __bool_constant<__is_same(_Tp, _Up)>
1584 template<
typename _Tp,
typename _Up>
1589 template<
typename _Tp>
1590 struct is_same<_Tp, _Tp>
1596 template<
typename _Base,
typename _Derived>
1598 :
public __bool_constant<__is_base_of(_Base, _Derived)>
1601#ifdef __cpp_lib_is_virtual_base_of
1604 template<typename _Base, typename _Derived>
1605 struct is_virtual_base_of
1606 :
public bool_constant<__builtin_is_virtual_base_of(_Base, _Derived)>
1610#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_convertible)
1611 template<
typename _From,
typename _To>
1612 struct is_convertible
1613 :
public __bool_constant<__is_convertible(_From, _To)>
1616 template<
typename _From,
typename _To,
1619 struct __is_convertible_helper
1621 using type =
typename is_void<_To>::type;
1624#pragma GCC diagnostic push
1625#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
1626 template<
typename _From,
typename _To>
1627 class __is_convertible_helper<_From, _To, false>
1629 template<
typename _To1>
1630 static void __test_aux(_To1)
noexcept;
1632 template<
typename _From1,
typename _To1,
1637 template<
typename,
typename>
1642 using type =
decltype(__test<_From, _To>(0));
1644#pragma GCC diagnostic pop
1647 template<
typename _From,
typename _To>
1648 struct is_convertible
1649 :
public __is_convertible_helper<_From, _To>::type
1654 template<
typename _ToElementType,
typename _FromElementType>
1655 using __is_array_convertible
1656 = is_convertible<_FromElementType(*)[], _ToElementType(*)[]>;
1658#ifdef __cpp_lib_is_nothrow_convertible
1660#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_convertible)
1662 template<
typename _From,
typename _To>
1663 inline constexpr bool is_nothrow_convertible_v
1664 = __is_nothrow_convertible(_From, _To);
1667 template<
typename _From,
typename _To>
1668 struct is_nothrow_convertible
1669 :
public bool_constant<is_nothrow_convertible_v<_From, _To>>
1672 template<
typename _From,
typename _To,
1675 struct __is_nt_convertible_helper
1679#pragma GCC diagnostic push
1680#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
1681 template<
typename _From,
typename _To>
1682 class __is_nt_convertible_helper<_From, _To, false>
1684 template<
typename _To1>
1685 static void __test_aux(_To1)
noexcept;
1687 template<
typename _From1,
typename _To1>
1692 template<
typename,
typename>
1697 using type =
decltype(__test<_From, _To>(0));
1699#pragma GCC diagnostic pop
1702 template<
typename _From,
typename _To>
1703 struct is_nothrow_convertible
1704 :
public __is_nt_convertible_helper<_From, _To>::type
1708 template<
typename _From,
typename _To>
1709 inline constexpr bool is_nothrow_convertible_v
1710 = is_nothrow_convertible<_From, _To>::value;
1714#pragma GCC diagnostic push
1715#pragma GCC diagnostic ignored "-Wc++14-extensions"
1716 template<
typename _Tp,
typename... _Args>
1717 struct __is_nothrow_new_constructible_impl
1719 noexcept(::new(std::declval<void*>()) _Tp(std::declval<_Args>()...))
1723 template<
typename _Tp,
typename... _Args>
1724 _GLIBCXX17_INLINE
constexpr bool __is_nothrow_new_constructible
1726 __is_nothrow_new_constructible_impl<_Tp, _Args...>>::value;
1727#pragma GCC diagnostic pop
1732 template<
typename _Tp>
1734 {
using type = _Tp; };
1736 template<
typename _Tp>
1738 {
using type = _Tp; };
1741 template<
typename _Tp>
1743 {
using type = _Tp; };
1745 template<
typename _Tp>
1747 {
using type = _Tp; };
1750#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_cv)
1751 template<
typename _Tp>
1753 {
using type = __remove_cv(_Tp); };
1755 template<
typename _Tp>
1757 {
using type = _Tp; };
1759 template<
typename _Tp>
1760 struct remove_cv<const _Tp>
1761 {
using type = _Tp; };
1763 template<
typename _Tp>
1765 {
using type = _Tp; };
1767 template<
typename _Tp>
1769 {
using type = _Tp; };
1773 template<
typename _Tp>
1775 {
using type = _Tp
const; };
1778 template<
typename _Tp>
1780 {
using type = _Tp
volatile; };
1783 template<
typename _Tp>
1785 {
using type = _Tp
const volatile; };
1787#ifdef __cpp_lib_transformation_trait_aliases
1789 template<typename _Tp>
1790 using remove_const_t =
typename remove_const<_Tp>::type;
1793 template<
typename _Tp>
1794 using remove_volatile_t =
typename remove_volatile<_Tp>::type;
1797 template<
typename _Tp>
1798 using remove_cv_t =
typename remove_cv<_Tp>::type;
1801 template<
typename _Tp>
1802 using add_const_t =
typename add_const<_Tp>::type;
1805 template<
typename _Tp>
1806 using add_volatile_t =
typename add_volatile<_Tp>::type;
1809 template<
typename _Tp>
1810 using add_cv_t =
typename add_cv<_Tp>::type;
1816#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_reference)
1817 template<
typename _Tp>
1819 {
using type = __remove_reference(_Tp); };
1821 template<
typename _Tp>
1823 {
using type = _Tp; };
1825 template<
typename _Tp>
1826 struct remove_reference<_Tp&>
1827 {
using type = _Tp; };
1829 template<
typename _Tp>
1831 {
using type = _Tp; };
1835 template<
typename _Tp>
1837 {
using type = __add_lval_ref_t<_Tp>; };
1840 template<
typename _Tp>
1842 {
using type = __add_rval_ref_t<_Tp>; };
1844#if __cplusplus > 201103L
1846 template<
typename _Tp>
1850 template<
typename _Tp>
1854 template<
typename _Tp>
1863 template<
typename _Unqualified,
bool _IsConst,
bool _IsVol>
1864 struct __cv_selector;
1866 template<
typename _Unqualified>
1867 struct __cv_selector<_Unqualified, false, false>
1868 {
using __type = _Unqualified; };
1870 template<
typename _Unqualified>
1871 struct __cv_selector<_Unqualified, false, true>
1872 {
using __type =
volatile _Unqualified; };
1874 template<
typename _Unqualified>
1875 struct __cv_selector<_Unqualified, true, false>
1876 {
using __type =
const _Unqualified; };
1878 template<
typename _Unqualified>
1879 struct __cv_selector<_Unqualified, true, true>
1880 {
using __type =
const volatile _Unqualified; };
1882 template<
typename _Qualified,
typename _Unqualified,
1885 class __match_cv_qualifiers
1887 using __match = __cv_selector<_Unqualified, _IsConst, _IsVol>;
1890 using __type =
typename __match::__type;
1894 template<
typename _Tp>
1895 struct __make_unsigned
1896 {
using __type = _Tp; };
1899 struct __make_unsigned<char>
1900 {
using __type =
unsigned char; };
1903 struct __make_unsigned<signed char>
1904 {
using __type =
unsigned char; };
1907 struct __make_unsigned<short>
1908 {
using __type =
unsigned short; };
1911 struct __make_unsigned<int>
1912 {
using __type =
unsigned int; };
1915 struct __make_unsigned<long>
1916 {
using __type =
unsigned long; };
1919 struct __make_unsigned<long long>
1920 {
using __type =
unsigned long long; };
1922#if defined(__GLIBCXX_TYPE_INT_N_0)
1925 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_0>
1926 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_0; };
1928#if defined(__GLIBCXX_TYPE_INT_N_1)
1931 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_1>
1932 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_1; };
1934#if defined(__GLIBCXX_TYPE_INT_N_2)
1937 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_2>
1938 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_2; };
1940#if defined(__GLIBCXX_TYPE_INT_N_3)
1943 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_3>
1944 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_3; };
1946#if defined __SIZEOF_INT128__ && defined __STRICT_ANSI__
1949 struct __make_unsigned<__int128>
1950 {
using __type =
unsigned __int128; };
1954 template<
typename _Tp,
1956 bool _IsEnum = __is_enum(_Tp)>
1957 class __make_unsigned_selector;
1959 template<
typename _Tp>
1960 class __make_unsigned_selector<_Tp, true, false>
1962 using __unsigned_type
1963 =
typename __make_unsigned<__remove_cv_t<_Tp>>::__type;
1967 =
typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type;
1970 class __make_unsigned_selector_base
1973 template<
typename...>
struct _List { };
1975 template<
typename _Tp,
typename... _Up>
1976 struct _List<_Tp, _Up...> : _List<_Up...>
1977 {
static constexpr size_t __size =
sizeof(_Tp); };
1979 template<
size_t _Sz,
typename _Tp,
bool = (_Sz <= _Tp::__size)>
1982 template<
size_t _Sz,
typename _U
int,
typename... _UInts>
1983 struct __select<_Sz, _List<_Uint, _UInts...>,
true>
1984 {
using __type = _Uint; };
1986 template<
size_t _Sz,
typename _Uint,
typename... _UInts>
1987 struct __select<_Sz, _List<_Uint, _UInts...>, false>
1988 : __select<_Sz, _List<_UInts...>>
1993 template<
typename _Tp>
1994 class __make_unsigned_selector<_Tp, false, true>
1995 : __make_unsigned_selector_base
1999 using _UInts = _List<
unsigned char,
unsigned short,
unsigned int,
2000 unsigned long,
unsigned long long
2001#ifdef __SIZEOF_INT128__
2006 using __unsigned_type =
typename __select<
sizeof(_Tp), _UInts>::__type;
2010 =
typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type;
2018 struct __make_unsigned<wchar_t>
2021 =
typename __make_unsigned_selector<wchar_t, false, true>::__type;
2024#ifdef _GLIBCXX_USE_CHAR8_T
2026 struct __make_unsigned<char8_t>
2029 =
typename __make_unsigned_selector<char8_t, false, true>::__type;
2034 struct __make_unsigned<char16_t>
2037 =
typename __make_unsigned_selector<char16_t, false, true>::__type;
2041 struct __make_unsigned<char32_t>
2044 =
typename __make_unsigned_selector<char32_t, false, true>::__type;
2052 template<
typename _Tp>
2054 {
using type =
typename __make_unsigned_selector<_Tp>::__type; };
2065 template<
typename _Tp>
2066 struct __make_signed
2067 {
using __type = _Tp; };
2070 struct __make_signed<char>
2071 {
using __type =
signed char; };
2074 struct __make_signed<unsigned char>
2075 {
using __type =
signed char; };
2078 struct __make_signed<unsigned short>
2079 {
using __type =
signed short; };
2082 struct __make_signed<unsigned int>
2083 {
using __type =
signed int; };
2086 struct __make_signed<unsigned long>
2087 {
using __type =
signed long; };
2090 struct __make_signed<unsigned long long>
2091 {
using __type =
signed long long; };
2093#if defined(__GLIBCXX_TYPE_INT_N_0)
2096 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_0>
2097 {
using __type = __GLIBCXX_TYPE_INT_N_0; };
2099#if defined(__GLIBCXX_TYPE_INT_N_1)
2102 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_1>
2103 {
using __type = __GLIBCXX_TYPE_INT_N_1; };
2105#if defined(__GLIBCXX_TYPE_INT_N_2)
2108 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_2>
2109 {
using __type = __GLIBCXX_TYPE_INT_N_2; };
2111#if defined(__GLIBCXX_TYPE_INT_N_3)
2114 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_3>
2115 {
using __type = __GLIBCXX_TYPE_INT_N_3; };
2117#if defined __SIZEOF_INT128__ && defined __STRICT_ANSI__
2120 struct __make_signed<unsigned __int128>
2121 {
using __type = __int128; };
2125 template<
typename _Tp,
2127 bool _IsEnum = __is_enum(_Tp)>
2128 class __make_signed_selector;
2130 template<
typename _Tp>
2131 class __make_signed_selector<_Tp, true, false>
2134 =
typename __make_signed<__remove_cv_t<_Tp>>::__type;
2138 =
typename __match_cv_qualifiers<_Tp, __signed_type>::__type;
2142 template<
typename _Tp>
2143 class __make_signed_selector<_Tp, false, true>
2145 using __unsigned_type =
typename __make_unsigned_selector<_Tp>::__type;
2148 using __type =
typename __make_signed_selector<__unsigned_type>::__type;
2156 struct __make_signed<wchar_t>
2159 =
typename __make_signed_selector<wchar_t, false, true>::__type;
2162#if defined(_GLIBCXX_USE_CHAR8_T)
2164 struct __make_signed<char8_t>
2167 =
typename __make_signed_selector<char8_t, false, true>::__type;
2172 struct __make_signed<char16_t>
2175 =
typename __make_signed_selector<char16_t, false, true>::__type;
2179 struct __make_signed<char32_t>
2182 =
typename __make_signed_selector<char32_t, false, true>::__type;
2190 template<
typename _Tp>
2192 {
using type =
typename __make_signed_selector<_Tp>::__type; };
2198 template<>
struct make_signed<bool const volatile>;
2200#if __cplusplus > 201103L
2202 template<
typename _Tp>
2206 template<
typename _Tp>
2213#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_extent)
2214 template<
typename _Tp>
2216 {
using type = __remove_extent(_Tp); };
2218 template<
typename _Tp>
2220 {
using type = _Tp; };
2222 template<
typename _Tp, std::
size_t _Size>
2223 struct remove_extent<_Tp[_Size]>
2224 {
using type = _Tp; };
2226 template<
typename _Tp>
2228 {
using type = _Tp; };
2232#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_all_extents)
2233 template<
typename _Tp>
2235 {
using type = __remove_all_extents(_Tp); };
2237 template<
typename _Tp>
2239 {
using type = _Tp; };
2241 template<
typename _Tp, std::
size_t _Size>
2242 struct remove_all_extents<_Tp[_Size]>
2243 {
using type =
typename remove_all_extents<_Tp>::type; };
2245 template<
typename _Tp>
2247 {
using type =
typename remove_all_extents<_Tp>::type; };
2250#if __cplusplus > 201103L
2252 template<
typename _Tp>
2256 template<
typename _Tp>
2263#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_pointer)
2264 template<
typename _Tp>
2266 {
using type = __remove_pointer(_Tp); };
2268 template<
typename _Tp,
typename>
2269 struct __remove_pointer_helper
2270 {
using type = _Tp; };
2272 template<
typename _Tp,
typename _Up>
2273 struct __remove_pointer_helper<_Tp, _Up*>
2274 {
using type = _Up; };
2276 template<
typename _Tp>
2278 :
public __remove_pointer_helper<_Tp, __remove_cv_t<_Tp>>
2283#if _GLIBCXX_USE_BUILTIN_TRAIT(__add_pointer)
2284 template<
typename _Tp>
2286 {
using type = __add_pointer(_Tp); };
2288 template<
typename _Tp,
typename =
void>
2289 struct __add_pointer_helper
2290 {
using type = _Tp; };
2292 template<
typename _Tp>
2293 struct __add_pointer_helper<_Tp, __void_t<_Tp*>>
2294 {
using type = _Tp*; };
2296 template<
typename _Tp>
2298 :
public __add_pointer_helper<_Tp>
2301 template<
typename _Tp>
2303 {
using type = _Tp*; };
2305 template<
typename _Tp>
2307 {
using type = _Tp*; };
2310#if __cplusplus > 201103L
2312 template<
typename _Tp>
2316 template<
typename _Tp>
2323 struct __attribute__((__aligned__)) __aligned_storage_max_align_t
2327 __aligned_storage_default_alignment([[__maybe_unused__]]
size_t __len)
2329#if _GLIBCXX_INLINE_VERSION
2331 = integral_constant<size_t,
alignof(__aligned_storage_max_align_t)>;
2333 return __len > (_Max_align::value / 2)
2335#
if _GLIBCXX_USE_BUILTIN_TRAIT(__builtin_clzg)
2336 : 1 << (__SIZE_WIDTH__ - __builtin_clzg(__len - 1u));
2338 : 1 << (__LLONG_WIDTH__ - __builtin_clzll(__len - 1ull));
2343 return alignof(__aligned_storage_max_align_t);
2379 template<
size_t _Len,
2380 size_t _Align = __aligned_storage_default_alignment(_Len)>
2382 _GLIBCXX23_DEPRECATED
2387 alignas(_Align)
unsigned char __data[_Len];
2391 template <
typename... _Types>
2392 struct __strictest_alignment
2394 static const size_t _S_alignment = 0;
2395 static const size_t _S_size = 0;
2398 template <
typename _Tp,
typename... _Types>
2399 struct __strictest_alignment<_Tp, _Types...>
2401 static const size_t _S_alignment =
2402 alignof(_Tp) > __strictest_alignment<_Types...>::_S_alignment
2403 ?
alignof(_Tp) : __strictest_alignment<_Types...>::_S_alignment;
2404 static const size_t _S_size =
2405 sizeof(_Tp) > __strictest_alignment<_Types...>::_S_size
2406 ?
sizeof(_Tp) : __strictest_alignment<_Types...>::_S_size;
2409#pragma GCC diagnostic push
2410#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2424 template <
size_t _Len,
typename... _Types>
2426 _GLIBCXX23_DEPRECATED
2430 static_assert(
sizeof...(_Types) != 0,
"At least one type is required");
2432 using __strictest = __strictest_alignment<_Types...>;
2433 static const size_t _S_len = _Len > __strictest::_S_size
2434 ? _Len : __strictest::_S_size;
2439 using type =
typename aligned_storage<_S_len, alignment_value>::type;
2442 template <
size_t _Len,
typename... _Types>
2443 const size_t aligned_union<_Len, _Types...>::alignment_value;
2444#pragma GCC diagnostic pop
2448#if _GLIBCXX_USE_BUILTIN_TRAIT(__decay)
2449 template<
typename _Tp>
2451 {
using type = __decay(_Tp); };
2455 template<
typename _Up>
2456 struct __decay_selector
2457 : __conditional_t<is_const<const _Up>::value,
2462 template<
typename _Up,
size_t _Nm>
2463 struct __decay_selector<_Up[_Nm]>
2464 {
using type = _Up*; };
2466 template<
typename _Up>
2467 struct __decay_selector<_Up[]>
2468 {
using type = _Up*; };
2473 template<
typename _Tp>
2475 {
using type =
typename __decay_selector<_Tp>::type; };
2477 template<
typename _Tp>
2479 {
using type =
typename __decay_selector<_Tp>::type; };
2481 template<
typename _Tp>
2483 {
using type =
typename __decay_selector<_Tp>::type; };
2489 template<
typename _Tp>
2490 struct __strip_reference_wrapper
2495 template<
typename _Tp>
2498 using __type = _Tp&;
2502 template<
typename _Tp>
2503 using __decay_t =
typename decay<_Tp>::type;
2505 template<
typename _Tp>
2506 using __decay_and_strip = __strip_reference_wrapper<__decay_t<_Tp>>;
2512 template<
typename... _Cond>
2513 using _Require = __enable_if_t<__and_<_Cond...>::value>;
2516 template<
typename _Tp>
2517 using __remove_cvref_t
2523 template<
bool _Cond,
typename _Iftrue,
typename _Iffalse>
2525 {
using type = _Iftrue; };
2528 template<
typename _Iftrue,
typename _Iffalse>
2530 {
using type = _Iffalse; };
2533 template<
typename... _Tp>
2545 template<
typename _Tp>
2546 struct __success_type
2547 {
using type = _Tp; };
2549 struct __failure_type
2552 struct __do_common_type_impl
2554 template<
typename _Tp,
typename _Up>
2560 template<
typename _Tp,
typename _Up>
2561 static __success_type<__decay_t<__cond_t<_Tp, _Up>>>
2564#if __cplusplus > 201703L
2567 template<
typename _Tp,
typename _Up>
2568 static __success_type<__remove_cvref_t<__cond_t<const _Tp&, const _Up&>>>
2572 template<
typename,
typename>
2573 static __failure_type
2576 template<
typename _Tp,
typename _Up>
2577 static decltype(_S_test_2<_Tp, _Up>(0))
2587 template<
typename _Tp0>
2593 template<
typename _Tp1,
typename _Tp2,
2594 typename _Dp1 = __decay_t<_Tp1>,
typename _Dp2 = __decay_t<_Tp2>>
2595 struct __common_type_impl
2599 using type = common_type<_Dp1, _Dp2>;
2602 template<
typename _Tp1,
typename _Tp2>
2603 struct __common_type_impl<_Tp1, _Tp2, _Tp1, _Tp2>
2604 :
private __do_common_type_impl
2608 using type =
decltype(_S_test<_Tp1, _Tp2>(0));
2612 template<
typename _Tp1,
typename _Tp2>
2614 :
public __common_type_impl<_Tp1, _Tp2>::type
2617 template<
typename...>
2618 struct __common_type_pack
2621 template<
typename,
typename,
typename =
void>
2622 struct __common_type_fold;
2625 template<
typename _Tp1,
typename _Tp2,
typename... _Rp>
2627 :
public __common_type_fold<common_type<_Tp1, _Tp2>,
2628 __common_type_pack<_Rp...>>
2634 template<
typename _CTp,
typename... _Rp>
2635 struct __common_type_fold<_CTp, __common_type_pack<_Rp...>,
2636 __void_t<typename _CTp::
type>>
2641 template<
typename _CTp,
typename _Rp>
2642 struct __common_type_fold<_CTp, _Rp, void>
2645 template<
typename _Tp,
bool = __is_enum(_Tp)>
2646 struct __underlying_type_impl
2648 using type = __underlying_type(_Tp);
2651 template<
typename _Tp>
2652 struct __underlying_type_impl<_Tp, false>
2657 template<
typename _Tp>
2659 :
public __underlying_type_impl<_Tp>
2663 template<
typename _Tp>
2664 struct __declval_protector
2666 static const bool __stop =
false;
2674 template<
typename _Tp>
2675 auto declval() noexcept -> decltype(__declval<_Tp>(0))
2677 static_assert(__declval_protector<_Tp>::__stop,
2678 "declval() must not be used!");
2679 return __declval<_Tp>(0);
2683 template<
typename _Signature>
2689 struct __invoke_memfun_ref { };
2690 struct __invoke_memfun_deref { };
2691 struct __invoke_memobj_ref { };
2692 struct __invoke_memobj_deref { };
2693 struct __invoke_other { };
2696 template<
typename _Tp,
typename _Tag>
2697 struct __result_of_success : __success_type<_Tp>
2698 {
using __invoke_type = _Tag; };
2701 struct __result_of_memfun_ref_impl
2703 template<
typename _Fp,
typename _Tp1,
typename... _Args>
2704 static __result_of_success<
decltype(
2706 ), __invoke_memfun_ref> _S_test(
int);
2708 template<
typename...>
2709 static __failure_type _S_test(...);
2712 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2713 struct __result_of_memfun_ref
2714 :
private __result_of_memfun_ref_impl
2716 using type =
decltype(_S_test<_MemPtr, _Arg, _Args...>(0));
2720 struct __result_of_memfun_deref_impl
2722 template<
typename _Fp,
typename _Tp1,
typename... _Args>
2723 static __result_of_success<
decltype(
2725 ), __invoke_memfun_deref> _S_test(
int);
2727 template<
typename...>
2728 static __failure_type _S_test(...);
2731 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2732 struct __result_of_memfun_deref
2733 :
private __result_of_memfun_deref_impl
2735 using type =
decltype(_S_test<_MemPtr, _Arg, _Args...>(0));
2739 struct __result_of_memobj_ref_impl
2741 template<
typename _Fp,
typename _Tp1>
2742 static __result_of_success<
decltype(
2744 ), __invoke_memobj_ref> _S_test(
int);
2746 template<
typename,
typename>
2747 static __failure_type _S_test(...);
2750 template<
typename _MemPtr,
typename _Arg>
2751 struct __result_of_memobj_ref
2752 :
private __result_of_memobj_ref_impl
2754 using type =
decltype(_S_test<_MemPtr, _Arg>(0));
2758 struct __result_of_memobj_deref_impl
2760 template<
typename _Fp,
typename _Tp1>
2761 static __result_of_success<
decltype(
2763 ), __invoke_memobj_deref> _S_test(
int);
2765 template<
typename,
typename>
2766 static __failure_type _S_test(...);
2769 template<
typename _MemPtr,
typename _Arg>
2770 struct __result_of_memobj_deref
2771 :
private __result_of_memobj_deref_impl
2773 using type =
decltype(_S_test<_MemPtr, _Arg>(0));
2776 template<
typename _MemPtr,
typename _Arg>
2777 struct __result_of_memobj;
2779 template<
typename _Res,
typename _Class,
typename _Arg>
2780 struct __result_of_memobj<_Res _Class::*, _Arg>
2782 using _Argval = __remove_cvref_t<_Arg>;
2783 using _MemPtr = _Res _Class::*;
2784 using type =
typename __conditional_t<__or_<is_same<_Argval, _Class>,
2785 is_base_of<_Class, _Argval>>::value,
2786 __result_of_memobj_ref<_MemPtr, _Arg>,
2787 __result_of_memobj_deref<_MemPtr, _Arg>
2791 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2792 struct __result_of_memfun;
2794 template<
typename _Res,
typename _Class,
typename _Arg,
typename... _Args>
2795 struct __result_of_memfun<_Res _Class::*, _Arg, _Args...>
2797 using _Argval =
typename remove_reference<_Arg>::type;
2798 using _MemPtr = _Res _Class::*;
2799 using type =
typename __conditional_t<is_base_of<_Class, _Argval>::value,
2800 __result_of_memfun_ref<_MemPtr, _Arg, _Args...>,
2801 __result_of_memfun_deref<_MemPtr, _Arg, _Args...>
2810 template<
typename _Tp,
typename _Up = __remove_cvref_t<_Tp>>
2816 template<
typename _Tp,
typename _Up>
2822 template<bool, bool,
typename _Functor,
typename... _ArgTypes>
2823 struct __result_of_impl
2825 using type = __failure_type;
2828 template<
typename _MemPtr,
typename _Arg>
2829 struct __result_of_impl<true, false, _MemPtr, _Arg>
2830 :
public __result_of_memobj<__decay_t<_MemPtr>,
2831 typename __inv_unwrap<_Arg>::type>
2834 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2835 struct __result_of_impl<false, true, _MemPtr, _Arg, _Args...>
2836 :
public __result_of_memfun<__decay_t<_MemPtr>,
2837 typename __inv_unwrap<_Arg>::type, _Args...>
2841 struct __result_of_other_impl
2843 template<
typename _Fn,
typename... _Args>
2844 static __result_of_success<
decltype(
2846 ), __invoke_other> _S_test(
int);
2848 template<
typename...>
2849 static __failure_type _S_test(...);
2852 template<
typename _Functor,
typename... _ArgTypes>
2853 struct __result_of_impl<false, false, _Functor, _ArgTypes...>
2854 :
private __result_of_other_impl
2856 using type =
decltype(_S_test<_Functor, _ArgTypes...>(0));
2860 template<
typename _Functor,
typename... _ArgTypes>
2861 struct __invoke_result
2862 :
public __result_of_impl<
2863 is_member_object_pointer<
2864 typename remove_reference<_Functor>::type
2866 is_member_function_pointer<
2867 typename remove_reference<_Functor>::type
2869 _Functor, _ArgTypes...
2874 template<
typename _Fn,
typename... _Args>
2875 using __invoke_result_t =
typename __invoke_result<_Fn, _Args...>::type;
2878 template<
typename _Functor,
typename... _ArgTypes>
2879 struct result_of<_Functor(_ArgTypes...)>
2880 :
public __invoke_result<_Functor, _ArgTypes...>
2881 { } _GLIBCXX17_DEPRECATED_SUGGEST(
"std::invoke_result");
2883#if __cplusplus >= 201402L
2884#pragma GCC diagnostic push
2885#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2887 template<
size_t _Len,
2888 size_t _Align = __aligned_storage_default_alignment(_Len)>
2889 using aligned_storage_t _GLIBCXX23_DEPRECATED =
typename aligned_storage<_Len, _Align>::type;
2891 template <
size_t _Len,
typename... _Types>
2892 using aligned_union_t _GLIBCXX23_DEPRECATED =
typename aligned_union<_Len, _Types...>
::type;
2893#pragma GCC diagnostic pop
2896 template<
typename _Tp>
2897 using decay_t =
typename decay<_Tp>::type;
2900 template<
bool _Cond,
typename _Tp =
void>
2904 template<
bool _Cond,
typename _Iftrue,
typename _Iffalse>
2905 using conditional_t =
typename conditional<_Cond, _Iftrue, _Iffalse>::type;
2908 template<
typename... _Tp>
2912 template<
typename _Tp>
2916 template<
typename _Tp>
2920#ifdef __cpp_lib_void_t
2922 template<typename...> using void_t = void;
2932 template<
typename _Def,
template<
typename...>
class _Op,
typename... _Args>
2933 struct __detected_or
2940 template<
typename _Def,
template<
typename...>
class _Op,
typename... _Args>
2941 requires requires {
typename _Op<_Args...>; }
2942 struct __detected_or<_Def, _Op, _Args...>
2944 using type = _Op<_Args...>;
2949 template<
typename _Default,
typename _AlwaysVoid,
2950 template<
typename...>
class _Op,
typename... _Args>
2953 using type = _Default;
2958 template<
typename _Default,
template<
typename...>
class _Op,
2960 struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...>
2962 using type = _Op<_Args...>;
2966 template<
typename _Default,
template<
typename...>
class _Op,
2968 using __detected_or = __detector<_Default, void, _Op, _Args...>;
2972 template<
typename _Default,
template<
typename...>
class _Op,
2974 using __detected_or_t
2975 =
typename __detected_or<_Default, _Op, _Args...>::type;
2981#define _GLIBCXX_HAS_NESTED_TYPE(_NTYPE) \
2982 template<typename _Tp, typename = __void_t<>> \
2983 struct __has_##_NTYPE \
2986 template<typename _Tp> \
2987 struct __has_##_NTYPE<_Tp, __void_t<typename _Tp::_NTYPE>> \
2991 template <
typename _Tp>
2992 struct __is_swappable;
2994 template <
typename _Tp>
2995 struct __is_nothrow_swappable;
3002 template<
typename _Tp>
3003 struct __is_tuple_like
3004 :
public __is_tuple_like_impl<__remove_cvref_t<_Tp>>::type
3008 template<
typename _Tp>
3009 _GLIBCXX20_CONSTEXPR
3011 _Require<__not_<__is_tuple_like<_Tp>>,
3015 noexcept(__and_<is_nothrow_move_constructible<_Tp>,
3018 template<
typename _Tp,
size_t _Nm>
3019 _GLIBCXX20_CONSTEXPR
3021 __enable_if_t<__is_swappable<_Tp>::value>
3022 swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
3023 noexcept(__is_nothrow_swappable<_Tp>::value);
3026 namespace __swappable_details {
3029 struct __do_is_swappable_impl
3031 template<
typename _Tp,
typename
3033 static true_type __test(
int);
3039 struct __do_is_nothrow_swappable_impl
3041 template<
typename _Tp>
3042 static __bool_constant<
3052 template<
typename _Tp>
3053 struct __is_swappable_impl
3054 :
public __swappable_details::__do_is_swappable_impl
3056 using type =
decltype(__test<_Tp>(0));
3059 template<
typename _Tp>
3060 struct __is_nothrow_swappable_impl
3061 :
public __swappable_details::__do_is_nothrow_swappable_impl
3063 using type =
decltype(__test<_Tp>(0));
3066 template<
typename _Tp>
3067 struct __is_swappable
3068 :
public __is_swappable_impl<_Tp>::type
3071 template<
typename _Tp>
3072 struct __is_nothrow_swappable
3073 :
public __is_nothrow_swappable_impl<_Tp>::type
3077#ifdef __cpp_lib_is_swappable
3081 template<
typename _Tp>
3083 :
public __is_swappable_impl<_Tp>::type
3085 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3086 "template argument must be a complete class or an unbounded array");
3090 template<
typename _Tp>
3091 struct is_nothrow_swappable
3092 :
public __is_nothrow_swappable_impl<_Tp>::type
3094 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3095 "template argument must be a complete class or an unbounded array");
3098#if __cplusplus >= 201402L
3100 template<
typename _Tp>
3101 _GLIBCXX17_INLINE
constexpr bool is_swappable_v =
3102 is_swappable<_Tp>::value;
3105 template<
typename _Tp>
3106 _GLIBCXX17_INLINE
constexpr bool is_nothrow_swappable_v =
3107 is_nothrow_swappable<_Tp>::value;
3111 namespace __swappable_with_details {
3114 struct __do_is_swappable_with_impl
3116 template<
typename _Tp,
typename _Up,
typename
3122 template<
typename,
typename>
3126 struct __do_is_nothrow_swappable_with_impl
3128 template<
typename _Tp,
typename _Up>
3129 static __bool_constant<
3135 template<
typename,
typename>
3141 template<
typename _Tp,
typename _Up>
3142 struct __is_swappable_with_impl
3143 :
public __swappable_with_details::__do_is_swappable_with_impl
3145 using type =
decltype(__test<_Tp, _Up>(0));
3149 template<
typename _Tp>
3150 struct __is_swappable_with_impl<_Tp&, _Tp&>
3151 :
public __swappable_details::__do_is_swappable_impl
3153 using type =
decltype(__test<_Tp&>(0));
3156 template<
typename _Tp,
typename _Up>
3157 struct __is_nothrow_swappable_with_impl
3158 :
public __swappable_with_details::__do_is_nothrow_swappable_with_impl
3160 using type =
decltype(__test<_Tp, _Up>(0));
3164 template<
typename _Tp>
3165 struct __is_nothrow_swappable_with_impl<_Tp&, _Tp&>
3166 :
public __swappable_details::__do_is_nothrow_swappable_impl
3168 using type =
decltype(__test<_Tp&>(0));
3173 template<
typename _Tp,
typename _Up>
3174 struct is_swappable_with
3175 :
public __is_swappable_with_impl<_Tp, _Up>::type
3177 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3178 "first template argument must be a complete class or an unbounded array");
3179 static_assert(std::__is_complete_or_unbounded(__type_identity<_Up>{}),
3180 "second template argument must be a complete class or an unbounded array");
3184 template<
typename _Tp,
typename _Up>
3185 struct is_nothrow_swappable_with
3186 :
public __is_nothrow_swappable_with_impl<_Tp, _Up>::type
3188 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3189 "first template argument must be a complete class or an unbounded array");
3190 static_assert(std::__is_complete_or_unbounded(__type_identity<_Up>{}),
3191 "second template argument must be a complete class or an unbounded array");
3194#if __cplusplus >= 201402L
3196 template<
typename _Tp,
typename _Up>
3197 _GLIBCXX17_INLINE
constexpr bool is_swappable_with_v =
3198 is_swappable_with<_Tp, _Up>::value;
3201 template<
typename _Tp,
typename _Up>
3202 _GLIBCXX17_INLINE
constexpr bool is_nothrow_swappable_with_v =
3203 is_nothrow_swappable_with<_Tp, _Up>::value;
3213 template<
typename _Result,
typename _Ret,
3215 struct __is_invocable_impl
3222 template<
typename _Result,
typename _Ret>
3223 struct __is_invocable_impl<_Result, _Ret,
3225 __void_t<typename _Result::
type>>
3231#pragma GCC diagnostic push
3232#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
3234 template<
typename _Result,
typename _Ret>
3235 struct __is_invocable_impl<_Result, _Ret,
3237 __void_t<typename _Result::
type>>
3241 using _Res_t =
typename _Result::type;
3245 static _Res_t _S_get() noexcept;
3248 template<typename _Tp>
3249 static
void _S_conv(__type_identity_t<_Tp>) noexcept;
3252 template<typename _Tp,
3253 bool _Nothrow = noexcept(_S_conv<_Tp>(_S_get())),
3254 typename = decltype(_S_conv<_Tp>(_S_get())),
3255#if __has_builtin(__reference_converts_from_temporary)
3256 bool _Dangle = __reference_converts_from_temporary(_Tp, _Res_t)
3258 bool _Dangle =
false
3261 static __bool_constant<_Nothrow && !_Dangle>
3264 template<
typename _Tp,
bool = false>
3270 using type =
decltype(_S_test<_Ret,
true>(1));
3273 using __nothrow_conv =
decltype(_S_test<_Ret>(1));
3275#pragma GCC diagnostic pop
3277 template<
typename _Fn,
typename... _ArgTypes>
3278 struct __is_invocable
3279#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_invocable)
3280 : __bool_constant<__is_invocable(_Fn, _ArgTypes...)>
3282 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type
3286 template<
typename _Fn,
typename _Tp,
typename... _Args>
3287 constexpr bool __call_is_nt(__invoke_memfun_ref)
3289 using _Up =
typename __inv_unwrap<_Tp>::type;
3294 template<
typename _Fn,
typename _Tp,
typename... _Args>
3295 constexpr bool __call_is_nt(__invoke_memfun_deref)
3301 template<
typename _Fn,
typename _Tp>
3302 constexpr bool __call_is_nt(__invoke_memobj_ref)
3304 using _Up =
typename __inv_unwrap<_Tp>::type;
3308 template<
typename _Fn,
typename _Tp>
3309 constexpr bool __call_is_nt(__invoke_memobj_deref)
3314 template<
typename _Fn,
typename... _Args>
3315 constexpr bool __call_is_nt(__invoke_other)
3320 template<
typename _Result,
typename _Fn,
typename... _Args>
3321 struct __call_is_nothrow
3323 std::__call_is_nt<_Fn, _Args...>(typename _Result::__invoke_type{})
3327 template<
typename _Fn,
typename... _Args>
3328 using __call_is_nothrow_
3329 = __call_is_nothrow<__invoke_result<_Fn, _Args...>, _Fn, _Args...>;
3332 template<
typename _Fn,
typename... _Args>
3333 struct __is_nothrow_invocable
3334#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_invocable)
3335 : __bool_constant<__is_nothrow_invocable(_Fn, _Args...)>
3337 : __and_<__is_invocable<_Fn, _Args...>,
3338 __call_is_nothrow_<_Fn, _Args...>>::type
3342#pragma GCC diagnostic push
3343#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
3344 struct __nonesuchbase {};
3345 struct __nonesuch :
private __nonesuchbase {
3346 ~__nonesuch() =
delete;
3347 __nonesuch(__nonesuch
const&) =
delete;
3348 void operator=(__nonesuch
const&) =
delete;
3350#pragma GCC diagnostic pop
3353#ifdef __cpp_lib_is_invocable
3355 template<typename _Functor, typename... _ArgTypes>
3356 struct invoke_result
3357 :
public __invoke_result<_Functor, _ArgTypes...>
3359 static_assert(std::__is_complete_or_unbounded(__type_identity<_Functor>{}),
3360 "_Functor must be a complete class or an unbounded array");
3361 static_assert((std::__is_complete_or_unbounded(
3362 __type_identity<_ArgTypes>{}) && ...),
3363 "each argument type must be a complete class or an unbounded array");
3367 template<
typename _Fn,
typename... _Args>
3368 using invoke_result_t =
typename invoke_result<_Fn, _Args...>::type;
3371 template<
typename _Fn,
typename... _ArgTypes>
3373#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_invocable)
3374 :
public __bool_constant<__is_invocable(_Fn, _ArgTypes...)>
3376 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type
3379 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3380 "_Fn must be a complete class or an unbounded array");
3381 static_assert((std::__is_complete_or_unbounded(
3382 __type_identity<_ArgTypes>{}) && ...),
3383 "each argument type must be a complete class or an unbounded array");
3387 template<
typename _Ret,
typename _Fn,
typename... _ArgTypes>
3388 struct is_invocable_r
3389 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>::type
3391 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3392 "_Fn must be a complete class or an unbounded array");
3393 static_assert((std::__is_complete_or_unbounded(
3394 __type_identity<_ArgTypes>{}) && ...),
3395 "each argument type must be a complete class or an unbounded array");
3396 static_assert(std::__is_complete_or_unbounded(__type_identity<_Ret>{}),
3397 "_Ret must be a complete class or an unbounded array");
3401 template<
typename _Fn,
typename... _ArgTypes>
3402 struct is_nothrow_invocable
3403#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_invocable)
3404 :
public __bool_constant<__is_nothrow_invocable(_Fn, _ArgTypes...)>
3406 : __and_<__is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>,
3407 __call_is_nothrow_<_Fn, _ArgTypes...>>::type
3410 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3411 "_Fn must be a complete class or an unbounded array");
3412 static_assert((std::__is_complete_or_unbounded(
3413 __type_identity<_ArgTypes>{}) && ...),
3414 "each argument type must be a complete class or an unbounded array");
3421 template<
typename _Result,
typename _Ret>
3422 using __is_nt_invocable_impl
3423 =
typename __is_invocable_impl<_Result, _Ret>::__nothrow_conv;
3427 template<
typename _Ret,
typename _Fn,
typename... _ArgTypes>
3428 struct is_nothrow_invocable_r
3429 : __and_<__is_nt_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>,
3430 __call_is_nothrow_<_Fn, _ArgTypes...>>::type
3432 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3433 "_Fn must be a complete class or an unbounded array");
3434 static_assert((std::__is_complete_or_unbounded(
3435 __type_identity<_ArgTypes>{}) && ...),
3436 "each argument type must be a complete class or an unbounded array");
3437 static_assert(std::__is_complete_or_unbounded(__type_identity<_Ret>{}),
3438 "_Ret must be a complete class or an unbounded array");
3442#if __cpp_lib_type_trait_variable_templates
3457template <
typename _Tp>
3459template <
typename _Tp>
3460 inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value;
3461template <
typename _Tp>
3463template <
typename _Tp>
3466#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_array)
3467template <
typename _Tp>
3468 inline constexpr bool is_array_v = __is_array(_Tp);
3470template <
typename _Tp>
3471 inline constexpr bool is_array_v =
false;
3472template <
typename _Tp>
3473 inline constexpr bool is_array_v<_Tp[]> =
true;
3474template <
typename _Tp,
size_t _Num>
3475 inline constexpr bool is_array_v<_Tp[_Num]> =
true;
3478#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_pointer)
3479template <
typename _Tp>
3480 inline constexpr bool is_pointer_v = __is_pointer(_Tp);
3482template <
typename _Tp>
3483 inline constexpr bool is_pointer_v =
false;
3484template <
typename _Tp>
3485 inline constexpr bool is_pointer_v<_Tp*> =
true;
3486template <
typename _Tp>
3487 inline constexpr bool is_pointer_v<_Tp* const> =
true;
3488template <
typename _Tp>
3489 inline constexpr bool is_pointer_v<_Tp* volatile> =
true;
3490template <
typename _Tp>
3491 inline constexpr bool is_pointer_v<_Tp* const volatile> =
true;
3494template <
typename _Tp>
3495 inline constexpr bool is_lvalue_reference_v =
false;
3496template <
typename _Tp>
3497 inline constexpr bool is_lvalue_reference_v<_Tp&> =
true;
3498template <
typename _Tp>
3499 inline constexpr bool is_rvalue_reference_v =
false;
3500template <
typename _Tp>
3501 inline constexpr bool is_rvalue_reference_v<_Tp&&> =
true;
3503#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_object_pointer)
3504template <
typename _Tp>
3505 inline constexpr bool is_member_object_pointer_v =
3506 __is_member_object_pointer(_Tp);
3508template <
typename _Tp>
3509 inline constexpr bool is_member_object_pointer_v =
3513#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_function_pointer)
3514template <
typename _Tp>
3515 inline constexpr bool is_member_function_pointer_v =
3516 __is_member_function_pointer(_Tp);
3518template <
typename _Tp>
3519 inline constexpr bool is_member_function_pointer_v =
3523template <
typename _Tp>
3524 inline constexpr bool is_enum_v = __is_enum(_Tp);
3525template <
typename _Tp>
3526 inline constexpr bool is_union_v = __is_union(_Tp);
3527template <
typename _Tp>
3528 inline constexpr bool is_class_v = __is_class(_Tp);
3531#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_reference)
3532template <
typename _Tp>
3533 inline constexpr bool is_reference_v = __is_reference(_Tp);
3535template <
typename _Tp>
3536 inline constexpr bool is_reference_v =
false;
3537template <
typename _Tp>
3538 inline constexpr bool is_reference_v<_Tp&> =
true;
3539template <
typename _Tp>
3540 inline constexpr bool is_reference_v<_Tp&&> =
true;
3543template <
typename _Tp>
3545template <
typename _Tp>
3548#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_object)
3549template <
typename _Tp>
3550 inline constexpr bool is_object_v = __is_object(_Tp);
3552template <
typename _Tp>
3556template <
typename _Tp>
3558template <
typename _Tp>
3559 inline constexpr bool is_compound_v = !is_fundamental_v<_Tp>;
3561#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_pointer)
3562template <
typename _Tp>
3563 inline constexpr bool is_member_pointer_v = __is_member_pointer(_Tp);
3565template <
typename _Tp>
3569#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_const)
3570template <
typename _Tp>
3571 inline constexpr bool is_const_v = __is_const(_Tp);
3573template <
typename _Tp>
3574 inline constexpr bool is_const_v =
false;
3575template <
typename _Tp>
3576 inline constexpr bool is_const_v<const _Tp> =
true;
3579#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_function)
3580template <
typename _Tp>
3581 inline constexpr bool is_function_v = __is_function(_Tp);
3583template <
typename _Tp>
3584 inline constexpr bool is_function_v = !is_const_v<const _Tp>;
3585template <
typename _Tp>
3586 inline constexpr bool is_function_v<_Tp&> =
false;
3587template <
typename _Tp>
3588 inline constexpr bool is_function_v<_Tp&&> =
false;
3591#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_volatile)
3592template <
typename _Tp>
3593 inline constexpr bool is_volatile_v = __is_volatile(_Tp);
3595template <
typename _Tp>
3596 inline constexpr bool is_volatile_v =
false;
3597template <
typename _Tp>
3598 inline constexpr bool is_volatile_v<volatile _Tp> =
true;
3601template <
typename _Tp>
3602 _GLIBCXX26_DEPRECATED_SUGGEST(
"is_trivially_default_constructible_v && is_trivially_copyable_v")
3603 inline constexpr
bool is_trivial_v = __is_trivial(_Tp);
3604template <typename _Tp>
3605 inline constexpr
bool is_trivially_copyable_v = __is_trivially_copyable(_Tp);
3606template <typename _Tp>
3607 inline constexpr
bool is_standard_layout_v = __is_standard_layout(_Tp);
3608template <typename _Tp>
3609 _GLIBCXX20_DEPRECATED_SUGGEST(
"is_standard_layout_v && is_trivial_v")
3610 inline constexpr
bool is_pod_v = __is_pod(_Tp);
3611template <typename _Tp>
3612 _GLIBCXX17_DEPRECATED
3613 inline constexpr
bool is_literal_type_v = __is_literal_type(_Tp);
3614template <typename _Tp>
3615 inline constexpr
bool is_empty_v = __is_empty(_Tp);
3616template <typename _Tp>
3617 inline constexpr
bool is_polymorphic_v = __is_polymorphic(_Tp);
3618template <typename _Tp>
3619 inline constexpr
bool is_abstract_v = __is_abstract(_Tp);
3620template <typename _Tp>
3621 inline constexpr
bool is_final_v = __is_final(_Tp);
3623template <typename _Tp>
3624 inline constexpr
bool is_signed_v =
is_signed<_Tp>::value;
3625template <typename _Tp>
3626 inline constexpr
bool is_unsigned_v =
is_unsigned<_Tp>::value;
3628template <typename _Tp, typename... _Args>
3629 inline constexpr
bool is_constructible_v = __is_constructible(_Tp, _Args...);
3630template <typename _Tp>
3631 inline constexpr
bool is_default_constructible_v = __is_constructible(_Tp);
3632template <typename _Tp>
3633 inline constexpr
bool is_copy_constructible_v
3634 = __is_constructible(_Tp, __add_lval_ref_t<const _Tp>);
3635template <typename _Tp>
3636 inline constexpr
bool is_move_constructible_v
3637 = __is_constructible(_Tp, __add_rval_ref_t<_Tp>);
3639template <typename _Tp, typename _Up>
3640 inline constexpr
bool is_assignable_v = __is_assignable(_Tp, _Up);
3641template <typename _Tp>
3642 inline constexpr
bool is_copy_assignable_v
3643 = __is_assignable(__add_lval_ref_t<_Tp>, __add_lval_ref_t<const _Tp>);
3644template <typename _Tp>
3645 inline constexpr
bool is_move_assignable_v
3646 = __is_assignable(__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>);
3648#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_destructible)
3649template <
typename _Tp>
3650 inline constexpr bool is_destructible_v = __is_destructible(_Tp);
3652template <
typename _Tp>
3656template <
typename _Tp,
typename... _Args>
3657 inline constexpr bool is_trivially_constructible_v
3658 = __is_trivially_constructible(_Tp, _Args...);
3659template <
typename _Tp>
3660 inline constexpr bool is_trivially_default_constructible_v
3661 = __is_trivially_constructible(_Tp);
3662template <
typename _Tp>
3663 inline constexpr bool is_trivially_copy_constructible_v
3664 = __is_trivially_constructible(_Tp, __add_lval_ref_t<const _Tp>);
3665template <
typename _Tp>
3666 inline constexpr bool is_trivially_move_constructible_v
3667 = __is_trivially_constructible(_Tp, __add_rval_ref_t<_Tp>);
3669template <
typename _Tp,
typename _Up>
3670 inline constexpr bool is_trivially_assignable_v
3671 = __is_trivially_assignable(_Tp, _Up);
3672template <
typename _Tp>
3673 inline constexpr bool is_trivially_copy_assignable_v
3674 = __is_trivially_assignable(__add_lval_ref_t<_Tp>,
3675 __add_lval_ref_t<const _Tp>);
3676template <
typename _Tp>
3677 inline constexpr bool is_trivially_move_assignable_v
3678 = __is_trivially_assignable(__add_lval_ref_t<_Tp>,
3679 __add_rval_ref_t<_Tp>);
3681#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_trivially_destructible)
3682template <
typename _Tp>
3683 inline constexpr bool is_trivially_destructible_v
3684 = __is_trivially_destructible(_Tp);
3686template <
typename _Tp>
3687 inline constexpr bool is_trivially_destructible_v =
false;
3689template <
typename _Tp>
3690 requires (!is_reference_v<_Tp>) &&
requires (_Tp& __t) { __t.~_Tp(); }
3691 inline constexpr bool is_trivially_destructible_v<_Tp>
3692 = __has_trivial_destructor(_Tp);
3693template <
typename _Tp>
3694 inline constexpr bool is_trivially_destructible_v<_Tp&> =
true;
3695template <
typename _Tp>
3696 inline constexpr bool is_trivially_destructible_v<_Tp&&> =
true;
3697template <
typename _Tp,
size_t _Nm>
3698 inline constexpr bool is_trivially_destructible_v<_Tp[_Nm]>
3699 = is_trivially_destructible_v<_Tp>;
3701template <
typename _Tp>
3702 inline constexpr bool is_trivially_destructible_v =
3706template <
typename _Tp,
typename... _Args>
3707 inline constexpr bool is_nothrow_constructible_v
3708 = __is_nothrow_constructible(_Tp, _Args...);
3709template <
typename _Tp>
3710 inline constexpr bool is_nothrow_default_constructible_v
3711 = __is_nothrow_constructible(_Tp);
3712template <
typename _Tp>
3713 inline constexpr bool is_nothrow_copy_constructible_v
3714 = __is_nothrow_constructible(_Tp, __add_lval_ref_t<const _Tp>);
3715template <
typename _Tp>
3716 inline constexpr bool is_nothrow_move_constructible_v
3717 = __is_nothrow_constructible(_Tp, __add_rval_ref_t<_Tp>);
3719template <
typename _Tp,
typename _Up>
3720 inline constexpr bool is_nothrow_assignable_v
3721 = __is_nothrow_assignable(_Tp, _Up);
3722template <
typename _Tp>
3723 inline constexpr bool is_nothrow_copy_assignable_v
3724 = __is_nothrow_assignable(__add_lval_ref_t<_Tp>,
3725 __add_lval_ref_t<const _Tp>);
3726template <
typename _Tp>
3727 inline constexpr bool is_nothrow_move_assignable_v
3728 = __is_nothrow_assignable(__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>);
3730#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_destructible)
3731template <
typename _Tp>
3732 inline constexpr bool is_nothrow_destructible_v
3733 = __is_nothrow_destructible(_Tp);
3735template <
typename _Tp>
3736 inline constexpr bool is_nothrow_destructible_v =
3740template <
typename _Tp>
3741 inline constexpr bool has_virtual_destructor_v
3742 = __has_virtual_destructor(_Tp);
3744template <
typename _Tp>
3745 inline constexpr size_t alignment_of_v = alignment_of<_Tp>::value;
3747#if _GLIBCXX_USE_BUILTIN_TRAIT(__array_rank) \
3748 && (!defined(__clang__) || __clang_major__ >= 20)
3749template <
typename _Tp>
3750 inline constexpr size_t rank_v = __array_rank(_Tp);
3752template <
typename _Tp>
3753 inline constexpr size_t rank_v = 0;
3754template <
typename _Tp,
size_t _Size>
3755 inline constexpr size_t rank_v<_Tp[_Size]> = 1 + rank_v<_Tp>;
3756template <
typename _Tp>
3757 inline constexpr size_t rank_v<_Tp[]> = 1 + rank_v<_Tp>;
3760template <
typename _Tp,
unsigned _Idx = 0>
3761 inline constexpr size_t extent_v = 0;
3762template <
typename _Tp,
size_t _Size>
3763 inline constexpr size_t extent_v<_Tp[_Size], 0> = _Size;
3764template <
typename _Tp,
unsigned _Idx,
size_t _Size>
3765 inline constexpr size_t extent_v<_Tp[_Size], _Idx> = extent_v<_Tp, _Idx - 1>;
3766template <
typename _Tp>
3767 inline constexpr size_t extent_v<_Tp[], 0> = 0;
3768template <
typename _Tp,
unsigned _Idx>
3769 inline constexpr size_t extent_v<_Tp[], _Idx> = extent_v<_Tp, _Idx - 1>;
3771#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_same)
3772template <
typename _Tp,
typename _Up>
3773 inline constexpr bool is_same_v = __is_same(_Tp, _Up);
3775template <
typename _Tp,
typename _Up>
3776 inline constexpr bool is_same_v =
false;
3777template <
typename _Tp>
3778 inline constexpr bool is_same_v<_Tp, _Tp> =
true;
3780template <
typename _Base,
typename _Derived>
3781 inline constexpr bool is_base_of_v = __is_base_of(_Base, _Derived);
3782#ifdef __cpp_lib_is_virtual_base_of
3783template <
typename _Base,
typename _Derived>
3784 inline constexpr bool is_virtual_base_of_v = __builtin_is_virtual_base_of(_Base, _Derived);
3786#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_convertible)
3787template <
typename _From,
typename _To>
3788 inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
3790template <
typename _From,
typename _To>
3791 inline constexpr bool is_convertible_v = is_convertible<_From, _To>::value;
3793template<
typename _Fn,
typename... _Args>
3794 inline constexpr bool is_invocable_v
3795#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_invocable)
3796 = __is_invocable(_Fn, _Args...);
3798 = is_invocable<_Fn, _Args...>::value;
3800template<
typename _Fn,
typename... _Args>
3801 inline constexpr bool is_nothrow_invocable_v
3802#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_invocable)
3803 = __is_nothrow_invocable(_Fn, _Args...);
3805 = is_nothrow_invocable<_Fn, _Args...>::value;
3807template<
typename _Ret,
typename _Fn,
typename... _Args>
3808 inline constexpr bool is_invocable_r_v
3809 = is_invocable_r<_Ret, _Fn, _Args...>::value;
3810template<
typename _Ret,
typename _Fn,
typename... _Args>
3811 inline constexpr bool is_nothrow_invocable_r_v
3812 = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value;
3816#ifdef __cpp_lib_has_unique_object_representations
3819 template<typename _Tp>
3820 struct has_unique_object_representations
3821 : bool_constant<__has_unique_object_representations(
3822 remove_cv_t<remove_all_extents_t<_Tp>>
3825 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3826 "template argument must be a complete class or an unbounded array");
3829# if __cpp_lib_type_trait_variable_templates
3831 template<typename _Tp>
3832 inline constexpr bool has_unique_object_representations_v
3833 = has_unique_object_representations<_Tp>::value;
3837#ifdef __cpp_lib_is_aggregate
3840 template<typename _Tp>
3842 : bool_constant<__is_aggregate(remove_cv_t<_Tp>)>
3845# if __cpp_lib_type_trait_variable_templates
3850 template<
typename _Tp>
3851 inline constexpr bool is_aggregate_v = __is_aggregate(remove_cv_t<_Tp>);
3859#ifdef __cpp_lib_remove_cvref
3860# if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_cvref)
3861 template<
typename _Tp>
3863 {
using type = __remove_cvref(_Tp); };
3865 template<
typename _Tp>
3867 {
using type =
typename remove_cv<_Tp>::type; };
3869 template<
typename _Tp>
3870 struct remove_cvref<_Tp&>
3871 {
using type =
typename remove_cv<_Tp>::type; };
3873 template<
typename _Tp>
3874 struct remove_cvref<_Tp&&>
3875 {
using type =
typename remove_cv<_Tp>::type; };
3878 template<
typename _Tp>
3879 using remove_cvref_t =
typename remove_cvref<_Tp>::type;
3883#ifdef __cpp_lib_type_identity
3888 template<
typename _Tp>
3889 struct type_identity {
using type = _Tp; };
3891 template<
typename _Tp>
3892 using type_identity_t =
typename type_identity<_Tp>::type;
3896#ifdef __cpp_lib_unwrap_ref
3901 template<
typename _Tp>
3902 struct unwrap_reference {
using type = _Tp; };
3904 template<
typename _Tp>
3907 template<
typename _Tp>
3908 using unwrap_reference_t =
typename unwrap_reference<_Tp>::type;
3915 template<
typename _Tp>
3916 struct unwrap_ref_decay {
using type = unwrap_reference_t<decay_t<_Tp>>; };
3918 template<
typename _Tp>
3919 using unwrap_ref_decay_t =
typename unwrap_ref_decay<_Tp>::type;
3923#ifdef __cpp_lib_bounded_array_traits
3927# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_bounded_array)
3928 template<
typename _Tp>
3929 inline constexpr bool is_bounded_array_v = __is_bounded_array(_Tp);
3931 template<
typename _Tp>
3932 inline constexpr bool is_bounded_array_v =
false;
3934 template<
typename _Tp,
size_t _Size>
3935 inline constexpr bool is_bounded_array_v<_Tp[_Size]> =
true;
3941# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_unbounded_array)
3942 template<
typename _Tp>
3943 inline constexpr bool is_unbounded_array_v = __is_unbounded_array(_Tp);
3945 template<
typename _Tp>
3946 inline constexpr bool is_unbounded_array_v =
false;
3948 template<
typename _Tp>
3949 inline constexpr bool is_unbounded_array_v<_Tp[]> =
true;
3954 template<
typename _Tp>
3955 struct is_bounded_array
3956 :
public bool_constant<is_bounded_array_v<_Tp>>
3961 template<
typename _Tp>
3962 struct is_unbounded_array
3963 :
public bool_constant<is_unbounded_array_v<_Tp>>
3967#if __has_builtin(__is_layout_compatible) && __cplusplus >= 202002L
3970 template<
typename _Tp,
typename _Up>
3972 : bool_constant<__is_layout_compatible(_Tp, _Up)>
3977 template<
typename _Tp,
typename _Up>
3979 = __is_layout_compatible(_Tp, _Up);
3981#if __has_builtin(__builtin_is_corresponding_member)
3982# ifndef __cpp_lib_is_layout_compatible
3983# error "libstdc++ bug: is_corresponding_member and is_layout_compatible are provided but their FTM is not set"
3987 template<
typename _S1,
typename _S2,
typename _M1,
typename _M2>
3990 {
return __builtin_is_corresponding_member(__m1, __m2); }
3994#if __has_builtin(__is_pointer_interconvertible_base_of) \
3995 && __cplusplus >= 202002L
3998 template<
typename _Base,
typename _Derived>
4000 : bool_constant<__is_pointer_interconvertible_base_of(_Base, _Derived)>
4005 template<
typename _Base,
typename _Derived>
4007 = __is_pointer_interconvertible_base_of(_Base, _Derived);
4009#if __has_builtin(__builtin_is_pointer_interconvertible_with_class)
4010# ifndef __cpp_lib_is_pointer_interconvertible
4011# error "libstdc++ bug: is_pointer_interconvertible available but FTM is not set"
4017 template<
typename _Tp,
typename _Mem>
4020 {
return __builtin_is_pointer_interconvertible_with_class(__mp); }
4024#ifdef __cpp_lib_is_scoped_enum
4028# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_scoped_enum)
4029 template<
typename _Tp>
4030 struct is_scoped_enum
4031 : bool_constant<__is_scoped_enum(_Tp)>
4034 template<
typename _Tp>
4035 struct is_scoped_enum
4039 template<
typename _Tp>
4040 requires __is_enum(_Tp)
4041 &&
requires(remove_cv_t<_Tp> __t) { __t = __t; }
4042 struct is_scoped_enum<_Tp>
4043 : bool_constant<!requires(_Tp __t, void(*__f)(int)) { __f(__t); }>
4049# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_scoped_enum)
4050 template<
typename _Tp>
4051 inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp);
4053 template<
typename _Tp>
4054 inline constexpr bool is_scoped_enum_v = is_scoped_enum<_Tp>::value;
4058#ifdef __cpp_lib_is_implicit_lifetime
4062 template<
typename _Tp>
4063 struct is_implicit_lifetime
4064 : bool_constant<__builtin_is_implicit_lifetime(_Tp)>
4069 template<
typename _Tp>
4070 inline constexpr bool is_implicit_lifetime_v
4071 = __builtin_is_implicit_lifetime(_Tp);
4074#ifdef __cpp_lib_reference_from_temporary
4079 template<typename _Tp, typename _Up>
4080 struct reference_constructs_from_temporary
4081 :
public bool_constant<__reference_constructs_from_temporary(_Tp, _Up)>
4083 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{})
4084 && std::__is_complete_or_unbounded(__type_identity<_Up>{}),
4085 "template argument must be a complete class or an unbounded array");
4092 template<
typename _Tp,
typename _Up>
4093 struct reference_converts_from_temporary
4094 :
public bool_constant<__reference_converts_from_temporary(_Tp, _Up)>
4096 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{})
4097 && std::__is_complete_or_unbounded(__type_identity<_Up>{}),
4098 "template argument must be a complete class or an unbounded array");
4103 template<
typename _Tp,
typename _Up>
4104 inline constexpr bool reference_constructs_from_temporary_v
4105 = reference_constructs_from_temporary<_Tp, _Up>::value;
4109 template<
typename _Tp,
typename _Up>
4110 inline constexpr bool reference_converts_from_temporary_v
4111 = reference_converts_from_temporary<_Tp, _Up>::value;
4114#ifdef __cpp_lib_is_constant_evaluated
4117 [[__gnu__::__always_inline__]]
4119 is_constant_evaluated() noexcept
4121#if __cpp_if_consteval >= 202106L
4122 if consteval {
return true; }
else {
return false; }
4124 return __builtin_is_constant_evaluated();
4129#if __cplusplus >= 202002L
4131 template<
typename _From,
typename _To>
4132 using __copy_cv =
typename __match_cv_qualifiers<_From, _To>::__type;
4134 template<
typename _Xp,
typename _Yp>
4138 template<
typename _Ap,
typename _Bp,
typename =
void>
4139 struct __common_ref_impl
4143 template<
typename _Ap,
typename _Bp>
4144 using __common_ref =
typename __common_ref_impl<_Ap, _Bp>::type;
4147 template<
typename _Xp,
typename _Yp>
4148 using __condres_cvref
4149 = __cond_res<__copy_cv<_Xp, _Yp>&, __copy_cv<_Yp, _Xp>&>;
4152 template<
typename _Xp,
typename _Yp>
4153 struct __common_ref_impl<_Xp&, _Yp&, __void_t<__condres_cvref<_Xp, _Yp>>>
4155 __condres_cvref<_Xp, _Yp>>
4159 template<
typename _Xp,
typename _Yp>
4163 template<
typename _Xp,
typename _Yp>
4164 struct __common_ref_impl<_Xp&&, _Yp&&,
4165 _Require<is_convertible<_Xp&&, __common_ref_C<_Xp, _Yp>>,
4166 is_convertible<_Yp&&, __common_ref_C<_Xp, _Yp>>>>
4167 {
using type = __common_ref_C<_Xp, _Yp>; };
4170 template<
typename _Xp,
typename _Yp>
4171 using __common_ref_D = __common_ref<const _Xp&, _Yp&>;
4174 template<
typename _Xp,
typename _Yp>
4175 struct __common_ref_impl<_Xp&&, _Yp&,
4176 _Require<is_convertible<_Xp&&, __common_ref_D<_Xp, _Yp>>>>
4177 {
using type = __common_ref_D<_Xp, _Yp>; };
4180 template<
typename _Xp,
typename _Yp>
4181 struct __common_ref_impl<_Xp&, _Yp&&>
4182 : __common_ref_impl<_Yp&&, _Xp&>
4186 template<
typename _Tp,
typename _Up,
4187 template<
typename>
class _TQual,
template<
typename>
class _UQual>
4188 struct basic_common_reference
4192 template<
typename _Tp>
4194 {
template<
typename _Up>
using __type = __copy_cv<_Tp, _Up>; };
4196 template<
typename _Tp>
4198 {
template<
typename _Up>
using __type = __copy_cv<_Tp, _Up>&; };
4200 template<
typename _Tp>
4201 struct __xref<_Tp&&>
4202 {
template<
typename _Up>
using __type = __copy_cv<_Tp, _Up>&&; };
4204 template<
typename _Tp1,
typename _Tp2>
4205 using __basic_common_ref
4206 =
typename basic_common_reference<remove_cvref_t<_Tp1>,
4207 remove_cvref_t<_Tp2>,
4208 __xref<_Tp1>::template __type,
4209 __xref<_Tp2>::template __type>::type;
4212 template<
typename... _Tp>
4213 struct common_reference;
4215 template<
typename... _Tp>
4220 struct common_reference<>
4224 template<
typename _Tp0>
4225 struct common_reference<_Tp0>
4226 {
using type = _Tp0; };
4229 template<
typename _Tp1,
typename _Tp2,
int _Bullet = 1>
4230 struct __common_reference_impl
4231 : __common_reference_impl<_Tp1, _Tp2, _Bullet + 1>
4235 template<
typename _Tp1,
typename _Tp2>
4236 struct common_reference<_Tp1, _Tp2>
4237 : __common_reference_impl<_Tp1, _Tp2>
4241 template<
typename _Tp1,
typename _Tp2>
4242 requires is_reference_v<_Tp1> && is_reference_v<_Tp2>
4243 &&
requires {
typename __common_ref<_Tp1, _Tp2>; }
4244#if __cpp_lib_common_reference
4245 && is_convertible_v<add_pointer_t<_Tp1>,
4247 && is_convertible_v<add_pointer_t<_Tp2>,
4250 struct __common_reference_impl<_Tp1, _Tp2, 1>
4251 {
using type = __common_ref<_Tp1, _Tp2>; };
4254 template<
typename _Tp1,
typename _Tp2>
4255 requires requires {
typename __basic_common_ref<_Tp1, _Tp2>; }
4256 struct __common_reference_impl<_Tp1, _Tp2, 2>
4257 {
using type = __basic_common_ref<_Tp1, _Tp2>; };
4260 template<
typename _Tp1,
typename _Tp2>
4261 requires requires {
typename __cond_res<_Tp1, _Tp2>; }
4262 struct __common_reference_impl<_Tp1, _Tp2, 3>
4263 {
using type = __cond_res<_Tp1, _Tp2>; };
4266 template<
typename _Tp1,
typename _Tp2>
4268 struct __common_reference_impl<_Tp1, _Tp2, 4>
4269 {
using type = common_type_t<_Tp1, _Tp2>; };
4272 template<
typename _Tp1,
typename _Tp2>
4273 struct __common_reference_impl<_Tp1, _Tp2, 5>
4277 template<
typename _Tp1,
typename _Tp2,
typename... _Rest>
4278 struct common_reference<_Tp1, _Tp2, _Rest...>
4279 : __common_type_fold<common_reference<_Tp1, _Tp2>,
4280 __common_type_pack<_Rest...>>
4284 template<
typename _Tp1,
typename _Tp2,
typename... _Rest>
4285 struct __common_type_fold<common_reference<_Tp1, _Tp2>,
4286 __common_type_pack<_Rest...>,
4288 :
public common_reference<common_reference_t<_Tp1, _Tp2>, _Rest...>
4294#if __cplusplus >= 201103L
4297 template<
size_t... _Indexes>
struct _Index_tuple { };
4300 template<
size_t _Num>
4301 struct _Build_index_tuple
4303#if __has_builtin(__make_integer_seq)
4304 template<
typename,
size_t... _Indices>
4305 using _IdxTuple = _Index_tuple<_Indices...>;
4308 using __type = __make_integer_seq<_IdxTuple, size_t, _Num>;
4311 using __type = _Index_tuple<__integer_pack(_Num)...>;
4316#ifdef __cpp_lib_constant_wrapper
4317 template<
typename _Tp>
4318 struct _CwFixedValue
4323 _CwFixedValue(__type __v) noexcept
4329 template<
typename _Tp,
size_t _Extent>
4330 struct _CwFixedValue<_Tp[_Extent]>
4332 using __type = _Tp[_Extent];
4335 _CwFixedValue(_Tp (&__arr)[_Extent]) noexcept
4336 : _CwFixedValue(__arr,
typename _Build_index_tuple<_Extent>::__type())
4339 template<
size_t... _Indices>
4341 _CwFixedValue(_Tp (&__arr)[_Extent], _Index_tuple<_Indices...>) noexcept
4342 : _M_data{__arr[_Indices]...}
4345 _Tp _M_data[_Extent];
4348 template<
typename _Tp,
size_t _Extent>
4349 _CwFixedValue(_Tp (&)[_Extent]) -> _CwFixedValue<_Tp[_Extent]>;
4351 template<_CwFixedValue _Xv,
4352 typename =
typename decltype(_CwFixedValue(_Xv))::__type>
4353 struct constant_wrapper;
4355 template<
typename _Tp>
4356 concept _ConstExprParam =
requires
4358 typename constant_wrapper<_Tp::value>;
4363 template<_ConstExprParam _Tp>
4364 friend constexpr auto
4365 operator+(_Tp)
noexcept -> constant_wrapper<(+_Tp::value)>
4368 template<_ConstExprParam _Tp>
4369 friend constexpr auto
4370 operator-(_Tp)
noexcept -> constant_wrapper<(-_Tp::value)>
4373 template<_ConstExprParam _Tp>
4374 friend constexpr auto
4375 operator~(_Tp)
noexcept -> constant_wrapper<(~_Tp::value)>
4378 template<_ConstExprParam _Tp>
4379 friend constexpr auto
4380 operator!(_Tp)
noexcept -> constant_wrapper<(!_Tp::value)>
4383 template<_ConstExprParam _Tp>
4384 friend constexpr auto
4385 operator&(_Tp)
noexcept -> constant_wrapper<(&_Tp::value)>
4388 template<_ConstExprParam _Tp>
4389 friend constexpr auto
4390 operator*(_Tp)
noexcept -> constant_wrapper<(*_Tp::value)>
4393 template<_ConstExprParam _Left, _ConstExprParam _Right>
4394 friend constexpr auto
4396 -> constant_wrapper<(_Left::value + _Right::value)>
4399 template<_ConstExprParam _Left, _ConstExprParam _Right>
4400 friend constexpr auto
4402 -> constant_wrapper<(_Left::value - _Right::value)>
4405 template<_ConstExprParam _Left, _ConstExprParam _Right>
4406 friend constexpr auto
4408 -> constant_wrapper<(_Left::value * _Right::value)>
4411 template<_ConstExprParam _Left, _ConstExprParam _Right>
4412 friend constexpr auto
4414 -> constant_wrapper<(_Left::value / _Right::value)>
4417 template<_ConstExprParam _Left, _ConstExprParam _Right>
4418 friend constexpr auto
4419 operator%(_Left, _Right)
noexcept
4420 -> constant_wrapper<(_Left::value % _Right::value)>
4423 template<_ConstExprParam _Left, _ConstExprParam _Right>
4424 friend constexpr auto
4426 -> constant_wrapper<(_Left::value << _Right::value)>
4429 template<_ConstExprParam _Left, _ConstExprParam _Right>
4430 friend constexpr auto
4432 -> constant_wrapper<(_Left::value >> _Right::value)>
4435 template<_ConstExprParam _Left, _ConstExprParam _Right>
4436 friend constexpr auto
4438 -> constant_wrapper<(_Left::value & _Right::value)>
4441 template<_ConstExprParam _Left, _ConstExprParam _Right>
4442 friend constexpr auto
4444 -> constant_wrapper<(_Left::value | _Right::value)>
4447 template<_ConstExprParam _Left, _ConstExprParam _Right>
4448 friend constexpr auto
4450 -> constant_wrapper<(_Left::value ^ _Right::value)>
4453 template<_ConstExprParam _Left, _ConstExprParam _Right>
4454 requires (!is_constructible_v<bool,
decltype(_Left::value)>
4455 || !is_constructible_v<bool,
decltype(_Right::value)>)
4456 friend constexpr auto
4457 operator&&(_Left, _Right)
noexcept
4458 -> constant_wrapper<(_Left::value && _Right::value)>
4461 template<_ConstExprParam _Left, _ConstExprParam _Right>
4462 requires (!is_constructible_v<bool,
decltype(_Left::value)>
4463 || !is_constructible_v<bool,
decltype(_Right::value)>)
4464 friend constexpr auto
4465 operator||(_Left, _Right)
noexcept
4466 -> constant_wrapper<(_Left::value || _Right::value)>
4469 template<_ConstExprParam _Left, _ConstExprParam _Right>
4470 friend constexpr auto
4471 operator<=>(_Left, _Right)
noexcept
4472 -> constant_wrapper<(_Left::value <=> _Right::value)>
4475 template<_ConstExprParam _Left, _ConstExprParam _Right>
4476 friend constexpr auto
4477 operator<(_Left, _Right)
noexcept
4478 -> constant_wrapper<(_Left::value < _Right::value)>
4481 template<_ConstExprParam _Left, _ConstExprParam _Right>
4482 friend constexpr auto
4483 operator<=(_Left, _Right)
noexcept
4484 -> constant_wrapper<(_Left::value <= _Right::value)>
4487 template<_ConstExprParam _Left, _ConstExprParam _Right>
4488 friend constexpr auto
4489 operator==(_Left, _Right)
noexcept
4490 -> constant_wrapper<(_Left::value == _Right::value)>
4493 template<_ConstExprParam _Left, _ConstExprParam _Right>
4494 friend constexpr auto
4495 operator!=(_Left, _Right)
noexcept
4496 -> constant_wrapper<(_Left::value != _Right::value)>
4499 template<_ConstExprParam _Left, _ConstExprParam _Right>
4500 friend constexpr auto
4501 operator>(_Left, _Right)
noexcept
4502 -> constant_wrapper<(_Left::value > _Right::value)>
4505 template<_ConstExprParam _Left, _ConstExprParam _Right>
4506 friend constexpr auto
4507 operator>=(_Left, _Right)
noexcept
4508 -> constant_wrapper<(_Left::value >= _Right::value)>
4511 template<_ConstExprParam _Left, _ConstExprParam _Right>
4512 friend constexpr auto
4513 operator,(_Left, _Right)
noexcept =
delete;
4515 template<_ConstExprParam _Left, _ConstExprParam _Right>
4516 friend constexpr auto
4517 operator->*(_Left, _Right)
noexcept
4518 -> constant_wrapper<_Left::value->*(_Right::value)>
4521 template<_ConstExprParam _Tp, _ConstExprParam... _Args>
4523 operator()(
this _Tp, _Args...) noexcept
4525 requires(_Args...) { constant_wrapper<_Tp::value(_Args::value...)>(); }
4526 {
return constant_wrapper<_Tp::value(_Args::value...)>{}; }
4528 template<_ConstExprParam _Tp, _ConstExprParam... _Args>
4530 operator[](
this _Tp, _Args...) noexcept
4531 -> constant_wrapper<(_Tp::value[_Args::value...])>
4534 template<_ConstExprParam _Tp>
4536 operator++(
this _Tp)
noexcept
4537 requires requires(_Tp::value_type __x) { ++__x; }
4539 return constant_wrapper<
4540 [] {
auto __x = _Tp::value;
return ++__x; }()>{};
4543 template<_ConstExprParam _Tp>
4545 operator++(
this _Tp,
int)
noexcept
4546 requires requires(_Tp::value_type __x) { __x++; }
4548 return constant_wrapper<
4549 [] {
auto __x = _Tp::value;
return __x++; }()>{};
4552 template<_ConstExprParam _Tp>
4554 operator--(
this _Tp)
noexcept
4555 requires requires(_Tp::value_type __x) { --__x; }
4557 return constant_wrapper<
4558 [] {
auto __x = _Tp::value;
return --__x; }()>{};
4561 template<_ConstExprParam _Tp>
4563 operator--(
this _Tp,
int)
noexcept
4564 requires requires(_Tp::value_type __x) { __x--; }
4566 return constant_wrapper<
4567 [] {
auto __x = _Tp::value;
return __x--; }()>{};
4570 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4572 operator+=(
this _Tp, _Right)
noexcept
4573 requires requires(_Tp::value_type __x) { __x += _Right::value; }
4575 return constant_wrapper<
4576 [] {
auto __x = _Tp::value;
return __x += _Right::value; }()>{};
4579 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4581 operator-=(
this _Tp, _Right)
noexcept
4582 requires requires(_Tp::value_type __x) { __x -= _Right::value; }
4584 return constant_wrapper<
4585 [] {
auto __x = _Tp::value;
return __x -= _Right::value; }()>{};
4588 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4590 operator*=(
this _Tp, _Right)
noexcept
4591 requires requires(_Tp::value_type __x) { __x *= _Right::value; }
4593 return constant_wrapper<
4594 [] {
auto __x = _Tp::value;
return __x *= _Right::value; }()>{};
4597 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4599 operator/=(
this _Tp, _Right)
noexcept
4600 requires requires(_Tp::value_type __x) { __x /= _Right::value; }
4602 return constant_wrapper<
4603 [] {
auto __x = _Tp::value;
return __x /= _Right::value; }()>{};
4606 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4608 operator%=(
this _Tp, _Right)
noexcept
4609 requires requires(_Tp::value_type __x) { __x %= _Right::value; }
4611 return constant_wrapper<
4612 [] {
auto __x = _Tp::value;
return __x %= _Right::value; }()>{};
4615 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4617 operator&=(
this _Tp, _Right)
noexcept
4618 requires requires(_Tp::value_type __x) { __x &= _Right::value; }
4620 return constant_wrapper<
4621 [] {
auto __x = _Tp::value;
return __x &= _Right::value; }()>{};
4624 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4626 operator|=(
this _Tp, _Right)
noexcept
4627 requires requires(_Tp::value_type __x) { __x |= _Right::value; }
4629 return constant_wrapper<
4630 [] {
auto __x = _Tp::value;
return __x |= _Right::value; }()>{};
4633 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4635 operator^=(
this _Tp, _Right)
noexcept
4636 requires requires(_Tp::value_type __x) { __x ^= _Right::value; }
4638 return constant_wrapper<
4639 [] {
auto __x = _Tp::value;
return __x ^= _Right::value; }()>{};
4642 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4644 operator<<=(
this _Tp, _Right)
noexcept
4645 requires requires(_Tp::value_type __x) { __x <<= _Right::value; }
4647 return constant_wrapper<
4648 [] {
auto __x = _Tp::value;
return __x <<= _Right::value; }()>{};
4651 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4653 operator>>=(
this _Tp, _Right)
noexcept
4654 requires requires(_Tp::value_type __x) { __x >>= _Right::value; }
4656 return constant_wrapper<
4657 [] {
auto __x = _Tp::value;
return __x >>= _Right::value; }()>{};
4661 template<_CwFixedValue _Xv,
typename>
4662 struct constant_wrapper : _CwOperators
4664 static constexpr const auto& value = _Xv._M_data;
4665 using type = constant_wrapper;
4666 using value_type =
typename decltype(_Xv)::__type;
4668 template<_ConstExprParam _Right>
4670 operator=(_Right)
const noexcept
4671 requires requires(value_type __x) { __x = _Right::value; }
4673 return constant_wrapper<
4674 [] {
auto __x = value;
return __x = _Right::value; }()>{};
4678 operator decltype(value)()
const noexcept
4682 template<_CwFixedValue _Tp>
4683 constexpr auto cw = constant_wrapper<_Tp>{};
4688_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