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<_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
844#if defined __STRICT_ANSI__ && defined __SIZEOF_INT128__
851 template<
typename _Tp>
852 using __is_unsigned_integer = __is_one_of<_Tp,
853 unsigned char,
unsigned short,
unsigned int,
unsigned long,
855#if defined(__GLIBCXX_TYPE_INT_N_0)
856 ,
unsigned __GLIBCXX_TYPE_INT_N_0
858#if defined(__GLIBCXX_TYPE_INT_N_1)
859 ,
unsigned __GLIBCXX_TYPE_INT_N_1
861#if defined(__GLIBCXX_TYPE_INT_N_2)
862 ,
unsigned __GLIBCXX_TYPE_INT_N_2
864#if defined(__GLIBCXX_TYPE_INT_N_3)
865 ,
unsigned __GLIBCXX_TYPE_INT_N_3
867#if defined __STRICT_ANSI__ && defined __SIZEOF_INT128__
874 template<
typename _Tp>
875 using __is_signed_or_unsigned_integer
876 = __or_<__is_signed_integer<_Tp>, __is_unsigned_integer<_Tp>>;
879 template<
typename...>
using __void_t = void;
885#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_const)
886 template<
typename _Tp>
888 :
public __bool_constant<__is_const(_Tp)>
895 template<
typename _Tp>
896 struct is_const<_Tp const>
897 :
public true_type { };
901#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_volatile)
902 template<
typename _Tp>
904 :
public __bool_constant<__is_volatile(_Tp)>
911 template<
typename _Tp>
912 struct is_volatile<_Tp volatile>
913 :
public true_type { };
923 template<
typename _Tp>
925 _GLIBCXX26_DEPRECATED_SUGGEST(
"is_trivially_default_constructible && is_trivially_copyable")
927 : public __bool_constant<__is_trivial(_Tp)>
929 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
930 "template argument must be a complete class or an unbounded array");
934 template<
typename _Tp>
936 :
public __bool_constant<__is_trivially_copyable(_Tp)>
938 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
939 "template argument must be a complete class or an unbounded array");
943 template<
typename _Tp>
945 :
public __bool_constant<__is_standard_layout(_Tp)>
947 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
948 "template argument must be a complete class or an unbounded array");
956 template<
typename _Tp>
958 _GLIBCXX20_DEPRECATED_SUGGEST(
"is_standard_layout && is_trivial")
960 : public __bool_constant<__is_pod(_Tp)>
962 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
963 "template argument must be a complete class or an unbounded array");
970 template<
typename _Tp>
972 _GLIBCXX17_DEPRECATED
974 :
public __bool_constant<__is_literal_type(_Tp)>
976 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
977 "template argument must be a complete class or an unbounded array");
981 template<
typename _Tp>
983 :
public __bool_constant<__is_empty(_Tp)>
987 template<
typename _Tp>
989 :
public __bool_constant<__is_polymorphic(_Tp)>
992#ifdef __cpp_lib_is_final
995 template<typename _Tp>
997 :
public __bool_constant<__is_final(_Tp)>
1002 template<
typename _Tp>
1004 :
public __bool_constant<__is_abstract(_Tp)>
1008 template<
typename _Tp,
1010 struct __is_signed_helper
1013 template<
typename _Tp>
1014 struct __is_signed_helper<_Tp, true>
1015 :
public __bool_constant<_Tp(-1) < _Tp(0)>
1020 template<typename _Tp>
1022 : public __is_signed_helper<_Tp>::type
1026 template<typename _Tp>
1028 : public __and_<is_arithmetic<_Tp>, __not_<is_signed<_Tp>>>::type
1032 template<typename _Tp, typename _Up = _Tp&&>
1036 template<typename _Tp>
1041 template<typename _Tp>
1042 auto declval() noexcept -> decltype(__declval<_Tp>(0));
1048 template<typename _Tp>
1049 struct __is_array_known_bounds
1053 template<
typename _Tp,
size_t _Size>
1054 struct __is_array_known_bounds<_Tp[_Size]>
1058 template<
typename _Tp>
1059 struct __is_array_unknown_bounds
1063 template<
typename _Tp>
1064 struct __is_array_unknown_bounds<_Tp[]>
1071#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_destructible)
1073 template<
typename _Tp>
1075 :
public __bool_constant<__is_destructible(_Tp)>
1085 struct __do_is_destructible_impl
1087 template<typename _Tp, typename = decltype(declval<_Tp&>().~_Tp())>
1094 template<
typename _Tp>
1095 struct __is_destructible_impl
1096 :
public __do_is_destructible_impl
1098 using type =
decltype(__test<_Tp>(0));
1101 template<
typename _Tp,
1102 bool = __or_<is_void<_Tp>,
1103 __is_array_unknown_bounds<_Tp>,
1106 struct __is_destructible_safe;
1108 template<
typename _Tp>
1109 struct __is_destructible_safe<_Tp, false, false>
1110 :
public __is_destructible_impl<typename
1111 remove_all_extents<_Tp>::type>::type
1114 template<
typename _Tp>
1115 struct __is_destructible_safe<_Tp, true, false>
1118 template<
typename _Tp>
1119 struct __is_destructible_safe<_Tp, false, true>
1124 template<
typename _Tp>
1126 :
public __is_destructible_safe<_Tp>::type
1128 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1129 "template argument must be a complete class or an unbounded array");
1133#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_destructible)
1135 template<
typename _Tp>
1137 :
public __bool_constant<__is_nothrow_destructible(_Tp)>
1146 struct __do_is_nt_destructible_impl
1148 template<
typename _Tp>
1149 static __bool_constant<noexcept(declval<_Tp&>().~_Tp())>
1156 template<
typename _Tp>
1157 struct __is_nt_destructible_impl
1158 :
public __do_is_nt_destructible_impl
1160 using type =
decltype(__test<_Tp>(0));
1163 template<
typename _Tp,
1164 bool = __or_<is_void<_Tp>,
1165 __is_array_unknown_bounds<_Tp>,
1168 struct __is_nt_destructible_safe;
1170 template<
typename _Tp>
1171 struct __is_nt_destructible_safe<_Tp, false, false>
1172 :
public __is_nt_destructible_impl<typename
1173 remove_all_extents<_Tp>::type>::type
1176 template<
typename _Tp>
1177 struct __is_nt_destructible_safe<_Tp, true, false>
1180 template<
typename _Tp>
1181 struct __is_nt_destructible_safe<_Tp, false, true>
1186 template<
typename _Tp>
1188 :
public __is_nt_destructible_safe<_Tp>::type
1190 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1191 "template argument must be a complete class or an unbounded array");
1196 template<
typename _Tp,
typename... _Args>
1197 using __is_constructible_impl
1198 = __bool_constant<__is_constructible(_Tp, _Args...)>;
1202 template<
typename _Tp,
typename... _Args>
1204 :
public __is_constructible_impl<_Tp, _Args...>
1206 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1207 "template argument must be a complete class or an unbounded array");
1211 template<
typename _Tp>
1213 :
public __is_constructible_impl<_Tp>
1215 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1216 "template argument must be a complete class or an unbounded array");
1220#if _GLIBCXX_USE_BUILTIN_TRAIT(__add_lvalue_reference)
1221 template<
typename _Tp>
1222 using __add_lval_ref_t = __add_lvalue_reference(_Tp);
1224 template<
typename _Tp,
typename =
void>
1225 struct __add_lvalue_reference_helper
1226 {
using type = _Tp; };
1228 template<
typename _Tp>
1229 struct __add_lvalue_reference_helper<_Tp, __void_t<_Tp&>>
1230 {
using type = _Tp&; };
1232 template<
typename _Tp>
1233 using __add_lval_ref_t =
typename __add_lvalue_reference_helper<_Tp>::type;
1238 template<
typename _Tp>
1240 :
public __is_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>>
1242 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1243 "template argument must be a complete class or an unbounded array");
1247#if _GLIBCXX_USE_BUILTIN_TRAIT(__add_rvalue_reference)
1248 template<
typename _Tp>
1249 using __add_rval_ref_t = __add_rvalue_reference(_Tp);
1251 template<
typename _Tp,
typename =
void>
1252 struct __add_rvalue_reference_helper
1253 {
using type = _Tp; };
1255 template<
typename _Tp>
1256 struct __add_rvalue_reference_helper<_Tp, __void_t<_Tp&&>>
1257 {
using type = _Tp&&; };
1259 template<
typename _Tp>
1260 using __add_rval_ref_t =
typename __add_rvalue_reference_helper<_Tp>::type;
1265 template<
typename _Tp>
1267 :
public __is_constructible_impl<_Tp, __add_rval_ref_t<_Tp>>
1269 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1270 "template argument must be a complete class or an unbounded array");
1274 template<
typename _Tp,
typename... _Args>
1275 using __is_nothrow_constructible_impl
1276 = __bool_constant<__is_nothrow_constructible(_Tp, _Args...)>;
1280 template<
typename _Tp,
typename... _Args>
1282 :
public __is_nothrow_constructible_impl<_Tp, _Args...>
1284 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1285 "template argument must be a complete class or an unbounded array");
1289 template<
typename _Tp>
1291 :
public __is_nothrow_constructible_impl<_Tp>
1293 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1294 "template argument must be a complete class or an unbounded array");
1298 template<
typename _Tp>
1300 :
public __is_nothrow_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>>
1302 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1303 "template argument must be a complete class or an unbounded array");
1307 template<
typename _Tp>
1309 :
public __is_nothrow_constructible_impl<_Tp, __add_rval_ref_t<_Tp>>
1311 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1312 "template argument must be a complete class or an unbounded array");
1316 template<
typename _Tp,
typename _Up>
1317 using __is_assignable_impl = __bool_constant<__is_assignable(_Tp, _Up)>;
1321 template<
typename _Tp,
typename _Up>
1323 :
public __is_assignable_impl<_Tp, _Up>
1325 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1326 "template argument must be a complete class or an unbounded array");
1330 template<
typename _Tp>
1332 :
public __is_assignable_impl<__add_lval_ref_t<_Tp>,
1333 __add_lval_ref_t<const _Tp>>
1335 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1336 "template argument must be a complete class or an unbounded array");
1340 template<
typename _Tp>
1342 :
public __is_assignable_impl<__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>>
1344 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1345 "template argument must be a complete class or an unbounded array");
1349 template<
typename _Tp,
typename _Up>
1350 using __is_nothrow_assignable_impl
1351 = __bool_constant<__is_nothrow_assignable(_Tp, _Up)>;
1355 template<
typename _Tp,
typename _Up>
1357 :
public __is_nothrow_assignable_impl<_Tp, _Up>
1359 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1360 "template argument must be a complete class or an unbounded array");
1364 template<
typename _Tp>
1366 :
public __is_nothrow_assignable_impl<__add_lval_ref_t<_Tp>,
1367 __add_lval_ref_t<const _Tp>>
1369 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1370 "template argument must be a complete class or an unbounded array");
1374 template<
typename _Tp>
1376 :
public __is_nothrow_assignable_impl<__add_lval_ref_t<_Tp>,
1377 __add_rval_ref_t<_Tp>>
1379 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1380 "template argument must be a complete class or an unbounded array");
1384 template<
typename _Tp,
typename... _Args>
1385 using __is_trivially_constructible_impl
1386 = __bool_constant<__is_trivially_constructible(_Tp, _Args...)>;
1390 template<
typename _Tp,
typename... _Args>
1392 :
public __is_trivially_constructible_impl<_Tp, _Args...>
1394 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1395 "template argument must be a complete class or an unbounded array");
1399 template<
typename _Tp>
1401 :
public __is_trivially_constructible_impl<_Tp>
1403 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1404 "template argument must be a complete class or an unbounded array");
1407#if __cpp_variable_templates && __cpp_concepts
1408 template<
typename _Tp>
1409 constexpr bool __is_implicitly_default_constructible_v
1410 =
requires (void(&__f)(_Tp)) { __f({}); };
1412 template<
typename _Tp>
1413 struct __is_implicitly_default_constructible
1414 : __bool_constant<__is_implicitly_default_constructible_v<_Tp>>
1417 struct __do_is_implicitly_default_constructible_impl
1419 template <
typename _Tp>
1420 static void __helper(
const _Tp&);
1422 template <
typename _Tp>
1424 decltype(__helper<const _Tp&>({}))* = 0);
1429 template<
typename _Tp>
1430 struct __is_implicitly_default_constructible_impl
1431 :
public __do_is_implicitly_default_constructible_impl
1436 template<
typename _Tp>
1437 struct __is_implicitly_default_constructible_safe
1438 :
public __is_implicitly_default_constructible_impl<_Tp>::type
1441 template <
typename _Tp>
1442 struct __is_implicitly_default_constructible
1443 :
public __and_<__is_constructible_impl<_Tp>,
1444 __is_implicitly_default_constructible_safe<_Tp>>::type
1449 template<
typename _Tp>
1451 :
public __is_trivially_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>>
1453 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1454 "template argument must be a complete class or an unbounded array");
1458 template<
typename _Tp>
1460 :
public __is_trivially_constructible_impl<_Tp, __add_rval_ref_t<_Tp>>
1462 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1463 "template argument must be a complete class or an unbounded array");
1467 template<
typename _Tp,
typename _Up>
1468 using __is_trivially_assignable_impl
1469 = __bool_constant<__is_trivially_assignable(_Tp, _Up)>;
1473 template<
typename _Tp,
typename _Up>
1475 :
public __is_trivially_assignable_impl<_Tp, _Up>
1477 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1478 "template argument must be a complete class or an unbounded array");
1482 template<
typename _Tp>
1484 :
public __is_trivially_assignable_impl<__add_lval_ref_t<_Tp>,
1485 __add_lval_ref_t<const _Tp>>
1487 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1488 "template argument must be a complete class or an unbounded array");
1492 template<
typename _Tp>
1494 :
public __is_trivially_assignable_impl<__add_lval_ref_t<_Tp>,
1495 __add_rval_ref_t<_Tp>>
1497 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1498 "template argument must be a complete class or an unbounded array");
1501#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_trivially_destructible)
1503 template<
typename _Tp>
1505 :
public __bool_constant<__is_trivially_destructible(_Tp)>
1509 template<
typename _Tp>
1511 :
public __and_<__is_destructible_safe<_Tp>,
1512 __bool_constant<__has_trivial_destructor(_Tp)>>
::type
1514 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1515 "template argument must be a complete class or an unbounded array");
1520 template<
typename _Tp>
1522 :
public __bool_constant<__has_virtual_destructor(_Tp)>
1524 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1525 "template argument must be a complete class or an unbounded array");
1532 template<
typename _Tp>
1536 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1537 "template argument must be a complete class or an unbounded array");
1541#if _GLIBCXX_USE_BUILTIN_TRAIT(__array_rank) \
1542 && (!defined(__clang__) || __clang_major__ >= 20)
1543 template<
typename _Tp>
1551 template<
typename _Tp, std::
size_t _Size>
1552 struct rank<_Tp[_Size]>
1553 :
public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
1555 template<
typename _Tp>
1561 template<
typename,
unsigned _U
int = 0>
1565 template<
typename _Tp,
size_t _Size>
1566 struct extent<_Tp[_Size], 0>
1569 template<
typename _Tp,
unsigned _U
int,
size_t _Size>
1570 struct extent<_Tp[_Size], _Uint>
1571 :
public extent<_Tp, _Uint - 1>::type { };
1573 template<
typename _Tp>
1577 template<
typename _Tp,
unsigned _U
int>
1578 struct extent<_Tp[], _Uint>
1579 :
public extent<_Tp, _Uint - 1>::type { };
1585#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_same)
1586 template<
typename _Tp,
typename _Up>
1588 :
public __bool_constant<__is_same(_Tp, _Up)>
1591 template<
typename _Tp,
typename _Up>
1596 template<
typename _Tp>
1597 struct is_same<_Tp, _Tp>
1603 template<
typename _Base,
typename _Derived>
1605 :
public __bool_constant<__is_base_of(_Base, _Derived)>
1608#ifdef __cpp_lib_is_virtual_base_of
1611 template<typename _Base, typename _Derived>
1612 struct is_virtual_base_of
1613 :
public bool_constant<__builtin_is_virtual_base_of(_Base, _Derived)>
1617#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_convertible)
1618 template<
typename _From,
typename _To>
1619 struct is_convertible
1620 :
public __bool_constant<__is_convertible(_From, _To)>
1623 template<
typename _From,
typename _To,
1626 struct __is_convertible_helper
1628 using type =
typename is_void<_To>::type;
1631#pragma GCC diagnostic push
1632#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
1633 template<
typename _From,
typename _To>
1634 class __is_convertible_helper<_From, _To, false>
1636 template<
typename _To1>
1637 static void __test_aux(_To1)
noexcept;
1639 template<
typename _From1,
typename _To1,
1644 template<
typename,
typename>
1649 using type =
decltype(__test<_From, _To>(0));
1651#pragma GCC diagnostic pop
1654 template<
typename _From,
typename _To>
1655 struct is_convertible
1656 :
public __is_convertible_helper<_From, _To>::type
1661 template<
typename _ToElementType,
typename _FromElementType>
1662 using __is_array_convertible
1663 = is_convertible<_FromElementType(*)[], _ToElementType(*)[]>;
1665#ifdef __cpp_lib_is_nothrow_convertible
1667#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_convertible)
1669 template<
typename _From,
typename _To>
1670 inline constexpr bool is_nothrow_convertible_v
1671 = __is_nothrow_convertible(_From, _To);
1674 template<
typename _From,
typename _To>
1675 struct is_nothrow_convertible
1676 :
public bool_constant<is_nothrow_convertible_v<_From, _To>>
1679 template<
typename _From,
typename _To,
1682 struct __is_nt_convertible_helper
1686#pragma GCC diagnostic push
1687#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
1688 template<
typename _From,
typename _To>
1689 class __is_nt_convertible_helper<_From, _To, false>
1691 template<
typename _To1>
1692 static void __test_aux(_To1)
noexcept;
1694 template<
typename _From1,
typename _To1>
1699 template<
typename,
typename>
1704 using type =
decltype(__test<_From, _To>(0));
1706#pragma GCC diagnostic pop
1709 template<
typename _From,
typename _To>
1710 struct is_nothrow_convertible
1711 :
public __is_nt_convertible_helper<_From, _To>::type
1715 template<
typename _From,
typename _To>
1716 inline constexpr bool is_nothrow_convertible_v
1717 = is_nothrow_convertible<_From, _To>::value;
1721#pragma GCC diagnostic push
1722#pragma GCC diagnostic ignored "-Wc++14-extensions"
1723 template<
typename _Tp,
typename... _Args>
1724 struct __is_nothrow_new_constructible_impl
1726 noexcept(::new(std::declval<void*>()) _Tp(std::declval<_Args>()...))
1730 template<
typename _Tp,
typename... _Args>
1731 _GLIBCXX17_INLINE
constexpr bool __is_nothrow_new_constructible
1733 __is_nothrow_new_constructible_impl<_Tp, _Args...>>::value;
1734#pragma GCC diagnostic pop
1739 template<
typename _Tp>
1741 {
using type = _Tp; };
1743 template<
typename _Tp>
1745 {
using type = _Tp; };
1748 template<
typename _Tp>
1750 {
using type = _Tp; };
1752 template<
typename _Tp>
1754 {
using type = _Tp; };
1757#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_cv)
1758 template<
typename _Tp>
1760 {
using type = __remove_cv(_Tp); };
1762 template<
typename _Tp>
1764 {
using type = _Tp; };
1766 template<
typename _Tp>
1767 struct remove_cv<const _Tp>
1768 {
using type = _Tp; };
1770 template<
typename _Tp>
1772 {
using type = _Tp; };
1774 template<
typename _Tp>
1776 {
using type = _Tp; };
1780 template<
typename _Tp>
1782 {
using type = _Tp
const; };
1785 template<
typename _Tp>
1787 {
using type = _Tp
volatile; };
1790 template<
typename _Tp>
1792 {
using type = _Tp
const volatile; };
1794#ifdef __cpp_lib_transformation_trait_aliases
1796 template<typename _Tp>
1797 using remove_const_t =
typename remove_const<_Tp>::type;
1800 template<
typename _Tp>
1801 using remove_volatile_t =
typename remove_volatile<_Tp>::type;
1804 template<
typename _Tp>
1805 using remove_cv_t =
typename remove_cv<_Tp>::type;
1808 template<
typename _Tp>
1809 using add_const_t =
typename add_const<_Tp>::type;
1812 template<
typename _Tp>
1813 using add_volatile_t =
typename add_volatile<_Tp>::type;
1816 template<
typename _Tp>
1817 using add_cv_t =
typename add_cv<_Tp>::type;
1823#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_reference)
1824 template<
typename _Tp>
1826 {
using type = __remove_reference(_Tp); };
1828 template<
typename _Tp>
1830 {
using type = _Tp; };
1832 template<
typename _Tp>
1833 struct remove_reference<_Tp&>
1834 {
using type = _Tp; };
1836 template<
typename _Tp>
1838 {
using type = _Tp; };
1842 template<
typename _Tp>
1844 {
using type = __add_lval_ref_t<_Tp>; };
1847 template<
typename _Tp>
1849 {
using type = __add_rval_ref_t<_Tp>; };
1851#if __cplusplus > 201103L
1853 template<
typename _Tp>
1857 template<
typename _Tp>
1861 template<
typename _Tp>
1870 template<
typename _Unqualified,
bool _IsConst,
bool _IsVol>
1871 struct __cv_selector;
1873 template<
typename _Unqualified>
1874 struct __cv_selector<_Unqualified, false, false>
1875 {
using __type = _Unqualified; };
1877 template<
typename _Unqualified>
1878 struct __cv_selector<_Unqualified, false, true>
1879 {
using __type =
volatile _Unqualified; };
1881 template<
typename _Unqualified>
1882 struct __cv_selector<_Unqualified, true, false>
1883 {
using __type =
const _Unqualified; };
1885 template<
typename _Unqualified>
1886 struct __cv_selector<_Unqualified, true, true>
1887 {
using __type =
const volatile _Unqualified; };
1889 template<
typename _Qualified,
typename _Unqualified,
1892 class __match_cv_qualifiers
1894 using __match = __cv_selector<_Unqualified, _IsConst, _IsVol>;
1897 using __type =
typename __match::__type;
1901 template<
typename _Tp>
1902 struct __make_unsigned
1903 {
using __type = _Tp; };
1906 struct __make_unsigned<char>
1907 {
using __type =
unsigned char; };
1910 struct __make_unsigned<signed char>
1911 {
using __type =
unsigned char; };
1914 struct __make_unsigned<short>
1915 {
using __type =
unsigned short; };
1918 struct __make_unsigned<int>
1919 {
using __type =
unsigned int; };
1922 struct __make_unsigned<long>
1923 {
using __type =
unsigned long; };
1926 struct __make_unsigned<long long>
1927 {
using __type =
unsigned long long; };
1929#if defined(__GLIBCXX_TYPE_INT_N_0)
1932 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_0>
1933 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_0; };
1935#if defined(__GLIBCXX_TYPE_INT_N_1)
1938 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_1>
1939 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_1; };
1941#if defined(__GLIBCXX_TYPE_INT_N_2)
1944 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_2>
1945 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_2; };
1947#if defined(__GLIBCXX_TYPE_INT_N_3)
1950 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_3>
1951 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_3; };
1953#if defined __SIZEOF_INT128__ && defined __STRICT_ANSI__
1956 struct __make_unsigned<__int128>
1957 {
using __type =
unsigned __int128; };
1961 template<
typename _Tp,
1963 bool _IsEnum = __is_enum(_Tp)>
1964 class __make_unsigned_selector;
1966 template<
typename _Tp>
1967 class __make_unsigned_selector<_Tp, true, false>
1969 using __unsigned_type
1970 =
typename __make_unsigned<__remove_cv_t<_Tp>>::__type;
1974 =
typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type;
1977 class __make_unsigned_selector_base
1980 template<
typename...>
struct _List { };
1982 template<
typename _Tp,
typename... _Up>
1983 struct _List<_Tp, _Up...> : _List<_Up...>
1984 {
static constexpr size_t __size =
sizeof(_Tp); };
1986 template<
size_t _Sz,
typename _Tp,
bool = (_Sz <= _Tp::__size)>
1989 template<
size_t _Sz,
typename _U
int,
typename... _UInts>
1990 struct __select<_Sz, _List<_Uint, _UInts...>,
true>
1991 {
using __type = _Uint; };
1993 template<
size_t _Sz,
typename _Uint,
typename... _UInts>
1994 struct __select<_Sz, _List<_Uint, _UInts...>, false>
1995 : __select<_Sz, _List<_UInts...>>
2000 template<
typename _Tp>
2001 class __make_unsigned_selector<_Tp, false, true>
2002 : __make_unsigned_selector_base
2006 using _UInts = _List<
unsigned char,
unsigned short,
unsigned int,
2007 unsigned long,
unsigned long long
2008#ifdef __SIZEOF_INT128__
2013 using __unsigned_type =
typename __select<
sizeof(_Tp), _UInts>::__type;
2017 =
typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type;
2025 struct __make_unsigned<wchar_t>
2028 =
typename __make_unsigned_selector<wchar_t, false, true>::__type;
2031#ifdef _GLIBCXX_USE_CHAR8_T
2033 struct __make_unsigned<char8_t>
2036 =
typename __make_unsigned_selector<char8_t, false, true>::__type;
2041 struct __make_unsigned<char16_t>
2044 =
typename __make_unsigned_selector<char16_t, false, true>::__type;
2048 struct __make_unsigned<char32_t>
2051 =
typename __make_unsigned_selector<char32_t, false, true>::__type;
2059 template<
typename _Tp>
2061 {
using type =
typename __make_unsigned_selector<_Tp>::__type; };
2072 template<
typename _Tp>
2073 struct __make_signed
2074 {
using __type = _Tp; };
2077 struct __make_signed<char>
2078 {
using __type =
signed char; };
2081 struct __make_signed<unsigned char>
2082 {
using __type =
signed char; };
2085 struct __make_signed<unsigned short>
2086 {
using __type =
signed short; };
2089 struct __make_signed<unsigned int>
2090 {
using __type =
signed int; };
2093 struct __make_signed<unsigned long>
2094 {
using __type =
signed long; };
2097 struct __make_signed<unsigned long long>
2098 {
using __type =
signed long long; };
2100#if defined(__GLIBCXX_TYPE_INT_N_0)
2103 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_0>
2104 {
using __type = __GLIBCXX_TYPE_INT_N_0; };
2106#if defined(__GLIBCXX_TYPE_INT_N_1)
2109 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_1>
2110 {
using __type = __GLIBCXX_TYPE_INT_N_1; };
2112#if defined(__GLIBCXX_TYPE_INT_N_2)
2115 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_2>
2116 {
using __type = __GLIBCXX_TYPE_INT_N_2; };
2118#if defined(__GLIBCXX_TYPE_INT_N_3)
2121 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_3>
2122 {
using __type = __GLIBCXX_TYPE_INT_N_3; };
2124#if defined __SIZEOF_INT128__ && defined __STRICT_ANSI__
2127 struct __make_signed<unsigned __int128>
2128 {
using __type = __int128; };
2132 template<
typename _Tp,
2134 bool _IsEnum = __is_enum(_Tp)>
2135 class __make_signed_selector;
2137 template<
typename _Tp>
2138 class __make_signed_selector<_Tp, true, false>
2141 =
typename __make_signed<__remove_cv_t<_Tp>>::__type;
2145 =
typename __match_cv_qualifiers<_Tp, __signed_type>::__type;
2149 template<
typename _Tp>
2150 class __make_signed_selector<_Tp, false, true>
2152 using __unsigned_type =
typename __make_unsigned_selector<_Tp>::__type;
2155 using __type =
typename __make_signed_selector<__unsigned_type>::__type;
2163 struct __make_signed<wchar_t>
2166 =
typename __make_signed_selector<wchar_t, false, true>::__type;
2169#if defined(_GLIBCXX_USE_CHAR8_T)
2171 struct __make_signed<char8_t>
2174 =
typename __make_signed_selector<char8_t, false, true>::__type;
2179 struct __make_signed<char16_t>
2182 =
typename __make_signed_selector<char16_t, false, true>::__type;
2186 struct __make_signed<char32_t>
2189 =
typename __make_signed_selector<char32_t, false, true>::__type;
2197 template<
typename _Tp>
2199 {
using type =
typename __make_signed_selector<_Tp>::__type; };
2205 template<>
struct make_signed<bool const volatile>;
2207#if __cplusplus > 201103L
2209 template<
typename _Tp>
2213 template<
typename _Tp>
2220#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_extent)
2221 template<
typename _Tp>
2223 {
using type = __remove_extent(_Tp); };
2225 template<
typename _Tp>
2227 {
using type = _Tp; };
2229 template<
typename _Tp, std::
size_t _Size>
2230 struct remove_extent<_Tp[_Size]>
2231 {
using type = _Tp; };
2233 template<
typename _Tp>
2235 {
using type = _Tp; };
2239#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_all_extents)
2240 template<
typename _Tp>
2242 {
using type = __remove_all_extents(_Tp); };
2244 template<
typename _Tp>
2246 {
using type = _Tp; };
2248 template<
typename _Tp, std::
size_t _Size>
2249 struct remove_all_extents<_Tp[_Size]>
2250 {
using type =
typename remove_all_extents<_Tp>::type; };
2252 template<
typename _Tp>
2254 {
using type =
typename remove_all_extents<_Tp>::type; };
2257#if __cplusplus > 201103L
2259 template<
typename _Tp>
2263 template<
typename _Tp>
2270#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_pointer)
2271 template<
typename _Tp>
2273 {
using type = __remove_pointer(_Tp); };
2275 template<
typename _Tp,
typename>
2276 struct __remove_pointer_helper
2277 {
using type = _Tp; };
2279 template<
typename _Tp,
typename _Up>
2280 struct __remove_pointer_helper<_Tp, _Up*>
2281 {
using type = _Up; };
2283 template<
typename _Tp>
2285 :
public __remove_pointer_helper<_Tp, __remove_cv_t<_Tp>>
2290#if _GLIBCXX_USE_BUILTIN_TRAIT(__add_pointer)
2291 template<
typename _Tp>
2293 {
using type = __add_pointer(_Tp); };
2295 template<
typename _Tp,
typename =
void>
2296 struct __add_pointer_helper
2297 {
using type = _Tp; };
2299 template<
typename _Tp>
2300 struct __add_pointer_helper<_Tp, __void_t<_Tp*>>
2301 {
using type = _Tp*; };
2303 template<
typename _Tp>
2305 :
public __add_pointer_helper<_Tp>
2308 template<
typename _Tp>
2310 {
using type = _Tp*; };
2312 template<
typename _Tp>
2314 {
using type = _Tp*; };
2317#if __cplusplus > 201103L
2319 template<
typename _Tp>
2323 template<
typename _Tp>
2330 struct __attribute__((__aligned__)) __aligned_storage_max_align_t
2334 __aligned_storage_default_alignment([[__maybe_unused__]]
size_t __len)
2336#if _GLIBCXX_INLINE_VERSION
2338 = integral_constant<size_t,
alignof(__aligned_storage_max_align_t)>;
2340 return __len > (_Max_align::value / 2)
2342#
if _GLIBCXX_USE_BUILTIN_TRAIT(__builtin_clzg)
2343 : 1 << (__SIZE_WIDTH__ - __builtin_clzg(__len - 1u));
2345 : 1 << (__LLONG_WIDTH__ - __builtin_clzll(__len - 1ull));
2350 return alignof(__aligned_storage_max_align_t);
2386 template<
size_t _Len,
2387 size_t _Align = __aligned_storage_default_alignment(_Len)>
2389 _GLIBCXX23_DEPRECATED
2394 alignas(_Align)
unsigned char __data[_Len];
2398 template <
typename... _Types>
2399 struct __strictest_alignment
2401 static const size_t _S_alignment = 0;
2402 static const size_t _S_size = 0;
2405 template <
typename _Tp,
typename... _Types>
2406 struct __strictest_alignment<_Tp, _Types...>
2408 static const size_t _S_alignment =
2409 alignof(_Tp) > __strictest_alignment<_Types...>::_S_alignment
2410 ?
alignof(_Tp) : __strictest_alignment<_Types...>::_S_alignment;
2411 static const size_t _S_size =
2412 sizeof(_Tp) > __strictest_alignment<_Types...>::_S_size
2413 ?
sizeof(_Tp) : __strictest_alignment<_Types...>::_S_size;
2416#pragma GCC diagnostic push
2417#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2431 template <
size_t _Len,
typename... _Types>
2433 _GLIBCXX23_DEPRECATED
2437 static_assert(
sizeof...(_Types) != 0,
"At least one type is required");
2439 using __strictest = __strictest_alignment<_Types...>;
2440 static const size_t _S_len = _Len > __strictest::_S_size
2441 ? _Len : __strictest::_S_size;
2446 using type =
typename aligned_storage<_S_len, alignment_value>::type;
2449 template <
size_t _Len,
typename... _Types>
2450 const size_t aligned_union<_Len, _Types...>::alignment_value;
2451#pragma GCC diagnostic pop
2455#if _GLIBCXX_USE_BUILTIN_TRAIT(__decay)
2456 template<
typename _Tp>
2458 {
using type = __decay(_Tp); };
2462 template<
typename _Up>
2463 struct __decay_selector
2464 : __conditional_t<is_const<const _Up>::value,
2469 template<
typename _Up,
size_t _Nm>
2470 struct __decay_selector<_Up[_Nm]>
2471 {
using type = _Up*; };
2473 template<
typename _Up>
2474 struct __decay_selector<_Up[]>
2475 {
using type = _Up*; };
2480 template<
typename _Tp>
2482 {
using type =
typename __decay_selector<_Tp>::type; };
2484 template<
typename _Tp>
2486 {
using type =
typename __decay_selector<_Tp>::type; };
2488 template<
typename _Tp>
2490 {
using type =
typename __decay_selector<_Tp>::type; };
2496 template<
typename _Tp>
2497 struct __strip_reference_wrapper
2502 template<
typename _Tp>
2505 using __type = _Tp&;
2509 template<
typename _Tp>
2510 using __decay_t =
typename decay<_Tp>::type;
2512 template<
typename _Tp>
2513 using __decay_and_strip = __strip_reference_wrapper<__decay_t<_Tp>>;
2519 template<
typename... _Cond>
2520 using _Require = __enable_if_t<__and_<_Cond...>::value>;
2523 template<
typename _Tp>
2524 using __remove_cvref_t
2530 template<
bool _Cond,
typename _Iftrue,
typename _Iffalse>
2532 {
using type = _Iftrue; };
2535 template<
typename _Iftrue,
typename _Iffalse>
2537 {
using type = _Iffalse; };
2540 template<
typename... _Tp>
2552 template<
typename _Tp>
2553 struct __success_type
2554 {
using type = _Tp; };
2556 struct __failure_type
2559 struct __do_common_type_impl
2561 template<
typename _Tp,
typename _Up>
2567 template<
typename _Tp,
typename _Up>
2568 static __success_type<__decay_t<__cond_t<_Tp, _Up>>>
2571#if __cplusplus > 201703L
2574 template<
typename _Tp,
typename _Up>
2575 static __success_type<__remove_cvref_t<__cond_t<const _Tp&, const _Up&>>>
2579 template<
typename,
typename>
2580 static __failure_type
2583 template<
typename _Tp,
typename _Up>
2584 static decltype(_S_test_2<_Tp, _Up>(0))
2594 template<
typename _Tp0>
2600 template<
typename _Tp1,
typename _Tp2,
2601 typename _Dp1 = __decay_t<_Tp1>,
typename _Dp2 = __decay_t<_Tp2>>
2602 struct __common_type_impl
2606 using type = common_type<_Dp1, _Dp2>;
2609 template<
typename _Tp1,
typename _Tp2>
2610 struct __common_type_impl<_Tp1, _Tp2, _Tp1, _Tp2>
2611 :
private __do_common_type_impl
2615 using type =
decltype(_S_test<_Tp1, _Tp2>(0));
2619 template<
typename _Tp1,
typename _Tp2>
2621 :
public __common_type_impl<_Tp1, _Tp2>::type
2624 template<
typename...>
2625 struct __common_type_pack
2628 template<
typename,
typename,
typename =
void>
2629 struct __common_type_fold;
2632 template<
typename _Tp1,
typename _Tp2,
typename... _Rp>
2634 :
public __common_type_fold<common_type<_Tp1, _Tp2>,
2635 __common_type_pack<_Rp...>>
2641 template<
typename _CTp,
typename... _Rp>
2642 struct __common_type_fold<_CTp, __common_type_pack<_Rp...>,
2643 __void_t<typename _CTp::
type>>
2648 template<
typename _CTp,
typename _Rp>
2649 struct __common_type_fold<_CTp, _Rp, void>
2652 template<
typename _Tp,
bool = __is_enum(_Tp)>
2653 struct __underlying_type_impl
2655 using type = __underlying_type(_Tp);
2658 template<
typename _Tp>
2659 struct __underlying_type_impl<_Tp, false>
2664 template<
typename _Tp>
2666 :
public __underlying_type_impl<_Tp>
2670 template<
typename _Tp>
2671 struct __declval_protector
2673 static const bool __stop =
false;
2681 template<
typename _Tp>
2682 auto declval() noexcept -> decltype(__declval<_Tp>(0))
2684 static_assert(__declval_protector<_Tp>::__stop,
2685 "declval() must not be used!");
2686 return __declval<_Tp>(0);
2690 template<
typename _Signature>
2696 struct __invoke_memfun_ref { };
2697 struct __invoke_memfun_deref { };
2698 struct __invoke_memobj_ref { };
2699 struct __invoke_memobj_deref { };
2700 struct __invoke_other { };
2703 template<
typename _Tp,
typename _Tag>
2704 struct __result_of_success : __success_type<_Tp>
2705 {
using __invoke_type = _Tag; };
2708 struct __result_of_memfun_ref_impl
2710 template<
typename _Fp,
typename _Tp1,
typename... _Args>
2711 static __result_of_success<
decltype(
2713 ), __invoke_memfun_ref> _S_test(
int);
2715 template<
typename...>
2716 static __failure_type _S_test(...);
2719 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2720 struct __result_of_memfun_ref
2721 :
private __result_of_memfun_ref_impl
2723 using type =
decltype(_S_test<_MemPtr, _Arg, _Args...>(0));
2727 struct __result_of_memfun_deref_impl
2729 template<
typename _Fp,
typename _Tp1,
typename... _Args>
2730 static __result_of_success<
decltype(
2732 ), __invoke_memfun_deref> _S_test(
int);
2734 template<
typename...>
2735 static __failure_type _S_test(...);
2738 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2739 struct __result_of_memfun_deref
2740 :
private __result_of_memfun_deref_impl
2742 using type =
decltype(_S_test<_MemPtr, _Arg, _Args...>(0));
2746 struct __result_of_memobj_ref_impl
2748 template<
typename _Fp,
typename _Tp1>
2749 static __result_of_success<
decltype(
2751 ), __invoke_memobj_ref> _S_test(
int);
2753 template<
typename,
typename>
2754 static __failure_type _S_test(...);
2757 template<
typename _MemPtr,
typename _Arg>
2758 struct __result_of_memobj_ref
2759 :
private __result_of_memobj_ref_impl
2761 using type =
decltype(_S_test<_MemPtr, _Arg>(0));
2765 struct __result_of_memobj_deref_impl
2767 template<
typename _Fp,
typename _Tp1>
2768 static __result_of_success<
decltype(
2770 ), __invoke_memobj_deref> _S_test(
int);
2772 template<
typename,
typename>
2773 static __failure_type _S_test(...);
2776 template<
typename _MemPtr,
typename _Arg>
2777 struct __result_of_memobj_deref
2778 :
private __result_of_memobj_deref_impl
2780 using type =
decltype(_S_test<_MemPtr, _Arg>(0));
2783 template<
typename _MemPtr,
typename _Arg>
2784 struct __result_of_memobj;
2786 template<
typename _Res,
typename _Class,
typename _Arg>
2787 struct __result_of_memobj<_Res _Class::*, _Arg>
2789 using _Argval = __remove_cvref_t<_Arg>;
2790 using _MemPtr = _Res _Class::*;
2791 using type =
typename __conditional_t<__or_<is_same<_Argval, _Class>,
2792 is_base_of<_Class, _Argval>>::value,
2793 __result_of_memobj_ref<_MemPtr, _Arg>,
2794 __result_of_memobj_deref<_MemPtr, _Arg>
2798 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2799 struct __result_of_memfun;
2801 template<
typename _Res,
typename _Class,
typename _Arg,
typename... _Args>
2802 struct __result_of_memfun<_Res _Class::*, _Arg, _Args...>
2804 using _Argval =
typename remove_reference<_Arg>::type;
2805 using _MemPtr = _Res _Class::*;
2806 using type =
typename __conditional_t<is_base_of<_Class, _Argval>::value,
2807 __result_of_memfun_ref<_MemPtr, _Arg, _Args...>,
2808 __result_of_memfun_deref<_MemPtr, _Arg, _Args...>
2817 template<
typename _Tp,
typename _Up = __remove_cvref_t<_Tp>>
2823 template<
typename _Tp,
typename _Up>
2829 template<bool, bool,
typename _Functor,
typename... _ArgTypes>
2830 struct __result_of_impl
2832 using type = __failure_type;
2835 template<
typename _MemPtr,
typename _Arg>
2836 struct __result_of_impl<true, false, _MemPtr, _Arg>
2837 :
public __result_of_memobj<__decay_t<_MemPtr>,
2838 typename __inv_unwrap<_Arg>::type>
2841 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2842 struct __result_of_impl<false, true, _MemPtr, _Arg, _Args...>
2843 :
public __result_of_memfun<__decay_t<_MemPtr>,
2844 typename __inv_unwrap<_Arg>::type, _Args...>
2848 struct __result_of_other_impl
2850 template<
typename _Fn,
typename... _Args>
2851 static __result_of_success<
decltype(
2853 ), __invoke_other> _S_test(
int);
2855 template<
typename...>
2856 static __failure_type _S_test(...);
2859 template<
typename _Functor,
typename... _ArgTypes>
2860 struct __result_of_impl<false, false, _Functor, _ArgTypes...>
2861 :
private __result_of_other_impl
2863 using type =
decltype(_S_test<_Functor, _ArgTypes...>(0));
2867 template<
typename _Functor,
typename... _ArgTypes>
2868 struct __invoke_result
2869 :
public __result_of_impl<
2870 is_member_object_pointer<
2871 typename remove_reference<_Functor>::type
2873 is_member_function_pointer<
2874 typename remove_reference<_Functor>::type
2876 _Functor, _ArgTypes...
2881 template<
typename _Fn,
typename... _Args>
2882 using __invoke_result_t =
typename __invoke_result<_Fn, _Args...>::type;
2885 template<
typename _Functor,
typename... _ArgTypes>
2886 struct result_of<_Functor(_ArgTypes...)>
2887 :
public __invoke_result<_Functor, _ArgTypes...>
2888 { } _GLIBCXX17_DEPRECATED_SUGGEST(
"std::invoke_result");
2890#if __cplusplus >= 201402L
2891#pragma GCC diagnostic push
2892#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2894 template<
size_t _Len,
2895 size_t _Align = __aligned_storage_default_alignment(_Len)>
2896 using aligned_storage_t _GLIBCXX23_DEPRECATED =
typename aligned_storage<_Len, _Align>::type;
2898 template <
size_t _Len,
typename... _Types>
2899 using aligned_union_t _GLIBCXX23_DEPRECATED =
typename aligned_union<_Len, _Types...>
::type;
2900#pragma GCC diagnostic pop
2903 template<
typename _Tp>
2904 using decay_t =
typename decay<_Tp>::type;
2907 template<
bool _Cond,
typename _Tp =
void>
2911 template<
bool _Cond,
typename _Iftrue,
typename _Iffalse>
2912 using conditional_t =
typename conditional<_Cond, _Iftrue, _Iffalse>::type;
2915 template<
typename... _Tp>
2919 template<
typename _Tp>
2923 template<
typename _Tp>
2927#ifdef __cpp_lib_void_t
2929 template<typename...> using void_t = void;
2939 template<
typename _Def,
template<
typename...>
class _Op,
typename... _Args>
2940 struct __detected_or
2947 template<
typename _Def,
template<
typename...>
class _Op,
typename... _Args>
2948 requires requires {
typename _Op<_Args...>; }
2949 struct __detected_or<_Def, _Op, _Args...>
2951 using type = _Op<_Args...>;
2956 template<
typename _Default,
typename _AlwaysVoid,
2957 template<
typename...>
class _Op,
typename... _Args>
2960 using type = _Default;
2965 template<
typename _Default,
template<
typename...>
class _Op,
2967 struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...>
2969 using type = _Op<_Args...>;
2973 template<
typename _Default,
template<
typename...>
class _Op,
2975 using __detected_or = __detector<_Default, void, _Op, _Args...>;
2979 template<
typename _Default,
template<
typename...>
class _Op,
2981 using __detected_or_t
2982 =
typename __detected_or<_Default, _Op, _Args...>::type;
2988#define _GLIBCXX_HAS_NESTED_TYPE(_NTYPE) \
2989 template<typename _Tp, typename = __void_t<>> \
2990 struct __has_##_NTYPE \
2993 template<typename _Tp> \
2994 struct __has_##_NTYPE<_Tp, __void_t<typename _Tp::_NTYPE>> \
2998 template <
typename _Tp>
2999 struct __is_swappable;
3001 template <
typename _Tp>
3002 struct __is_nothrow_swappable;
3009 template<
typename _Tp>
3010 struct __is_tuple_like
3011 :
public __is_tuple_like_impl<__remove_cvref_t<_Tp>>::type
3015 template<
typename _Tp>
3016 _GLIBCXX20_CONSTEXPR
3018 _Require<__not_<__is_tuple_like<_Tp>>,
3022 noexcept(__and_<is_nothrow_move_constructible<_Tp>,
3025 template<
typename _Tp,
size_t _Nm>
3026 _GLIBCXX20_CONSTEXPR
3028 __enable_if_t<__is_swappable<_Tp>::value>
3029 swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
3030 noexcept(__is_nothrow_swappable<_Tp>::value);
3033 namespace __swappable_details {
3036 struct __do_is_swappable_impl
3038 template<
typename _Tp,
typename
3040 static true_type __test(
int);
3046 struct __do_is_nothrow_swappable_impl
3048 template<
typename _Tp>
3049 static __bool_constant<
3059 template<
typename _Tp>
3060 struct __is_swappable_impl
3061 :
public __swappable_details::__do_is_swappable_impl
3063 using type =
decltype(__test<_Tp>(0));
3066 template<
typename _Tp>
3067 struct __is_nothrow_swappable_impl
3068 :
public __swappable_details::__do_is_nothrow_swappable_impl
3070 using type =
decltype(__test<_Tp>(0));
3073 template<
typename _Tp>
3074 struct __is_swappable
3075 :
public __is_swappable_impl<_Tp>::type
3078 template<
typename _Tp>
3079 struct __is_nothrow_swappable
3080 :
public __is_nothrow_swappable_impl<_Tp>::type
3084#ifdef __cpp_lib_is_swappable
3088 template<
typename _Tp>
3090 :
public __is_swappable_impl<_Tp>::type
3092 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3093 "template argument must be a complete class or an unbounded array");
3097 template<
typename _Tp>
3098 struct is_nothrow_swappable
3099 :
public __is_nothrow_swappable_impl<_Tp>::type
3101 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3102 "template argument must be a complete class or an unbounded array");
3105#if __cplusplus >= 201402L
3107 template<
typename _Tp>
3108 _GLIBCXX17_INLINE
constexpr bool is_swappable_v =
3109 is_swappable<_Tp>::value;
3112 template<
typename _Tp>
3113 _GLIBCXX17_INLINE
constexpr bool is_nothrow_swappable_v =
3114 is_nothrow_swappable<_Tp>::value;
3118 namespace __swappable_with_details {
3121 struct __do_is_swappable_with_impl
3123 template<
typename _Tp,
typename _Up,
typename
3129 template<
typename,
typename>
3133 struct __do_is_nothrow_swappable_with_impl
3135 template<
typename _Tp,
typename _Up>
3136 static __bool_constant<
3142 template<
typename,
typename>
3148 template<
typename _Tp,
typename _Up>
3149 struct __is_swappable_with_impl
3150 :
public __swappable_with_details::__do_is_swappable_with_impl
3152 using type =
decltype(__test<_Tp, _Up>(0));
3156 template<
typename _Tp>
3157 struct __is_swappable_with_impl<_Tp&, _Tp&>
3158 :
public __swappable_details::__do_is_swappable_impl
3160 using type =
decltype(__test<_Tp&>(0));
3163 template<
typename _Tp,
typename _Up>
3164 struct __is_nothrow_swappable_with_impl
3165 :
public __swappable_with_details::__do_is_nothrow_swappable_with_impl
3167 using type =
decltype(__test<_Tp, _Up>(0));
3171 template<
typename _Tp>
3172 struct __is_nothrow_swappable_with_impl<_Tp&, _Tp&>
3173 :
public __swappable_details::__do_is_nothrow_swappable_impl
3175 using type =
decltype(__test<_Tp&>(0));
3180 template<
typename _Tp,
typename _Up>
3181 struct is_swappable_with
3182 :
public __is_swappable_with_impl<_Tp, _Up>::type
3184 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3185 "first template argument must be a complete class or an unbounded array");
3186 static_assert(std::__is_complete_or_unbounded(__type_identity<_Up>{}),
3187 "second template argument must be a complete class or an unbounded array");
3191 template<
typename _Tp,
typename _Up>
3192 struct is_nothrow_swappable_with
3193 :
public __is_nothrow_swappable_with_impl<_Tp, _Up>::type
3195 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3196 "first template argument must be a complete class or an unbounded array");
3197 static_assert(std::__is_complete_or_unbounded(__type_identity<_Up>{}),
3198 "second template argument must be a complete class or an unbounded array");
3201#if __cplusplus >= 201402L
3203 template<
typename _Tp,
typename _Up>
3204 _GLIBCXX17_INLINE
constexpr bool is_swappable_with_v =
3205 is_swappable_with<_Tp, _Up>::value;
3208 template<
typename _Tp,
typename _Up>
3209 _GLIBCXX17_INLINE
constexpr bool is_nothrow_swappable_with_v =
3210 is_nothrow_swappable_with<_Tp, _Up>::value;
3220 template<
typename _Result,
typename _Ret,
3222 struct __is_invocable_impl
3229 template<
typename _Result,
typename _Ret>
3230 struct __is_invocable_impl<_Result, _Ret,
3232 __void_t<typename _Result::
type>>
3238#pragma GCC diagnostic push
3239#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
3241 template<
typename _Result,
typename _Ret>
3242 struct __is_invocable_impl<_Result, _Ret,
3244 __void_t<typename _Result::
type>>
3248 using _Res_t =
typename _Result::type;
3252 static _Res_t _S_get() noexcept;
3255 template<typename _Tp>
3256 static
void _S_conv(__type_identity_t<_Tp>) noexcept;
3259 template<typename _Tp,
3260 bool _Nothrow = noexcept(_S_conv<_Tp>(_S_get())),
3261 typename = decltype(_S_conv<_Tp>(_S_get())),
3262#if __has_builtin(__reference_converts_from_temporary)
3263 bool _Dangle = __reference_converts_from_temporary(_Tp, _Res_t)
3265 bool _Dangle =
false
3268 static __bool_constant<_Nothrow && !_Dangle>
3271 template<
typename _Tp,
bool = false>
3277 using type =
decltype(_S_test<_Ret,
true>(1));
3280 using __nothrow_conv =
decltype(_S_test<_Ret>(1));
3282#pragma GCC diagnostic pop
3284 template<
typename _Fn,
typename... _ArgTypes>
3285 struct __is_invocable
3286#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_invocable)
3287 : __bool_constant<__is_invocable(_Fn, _ArgTypes...)>
3289 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type
3293 template<
typename _Fn,
typename _Tp,
typename... _Args>
3294 constexpr bool __call_is_nt(__invoke_memfun_ref)
3296 using _Up =
typename __inv_unwrap<_Tp>::type;
3301 template<
typename _Fn,
typename _Tp,
typename... _Args>
3302 constexpr bool __call_is_nt(__invoke_memfun_deref)
3308 template<
typename _Fn,
typename _Tp>
3309 constexpr bool __call_is_nt(__invoke_memobj_ref)
3311 using _Up =
typename __inv_unwrap<_Tp>::type;
3315 template<
typename _Fn,
typename _Tp>
3316 constexpr bool __call_is_nt(__invoke_memobj_deref)
3321 template<
typename _Fn,
typename... _Args>
3322 constexpr bool __call_is_nt(__invoke_other)
3327 template<
typename _Result,
typename _Fn,
typename... _Args>
3328 struct __call_is_nothrow
3330 std::__call_is_nt<_Fn, _Args...>(typename _Result::__invoke_type{})
3334 template<
typename _Fn,
typename... _Args>
3335 using __call_is_nothrow_
3336 = __call_is_nothrow<__invoke_result<_Fn, _Args...>, _Fn, _Args...>;
3339 template<
typename _Fn,
typename... _Args>
3340 struct __is_nothrow_invocable
3341#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_invocable)
3342 : __bool_constant<__is_nothrow_invocable(_Fn, _Args...)>
3344 : __and_<__is_invocable<_Fn, _Args...>,
3345 __call_is_nothrow_<_Fn, _Args...>>::type
3349#pragma GCC diagnostic push
3350#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
3351 struct __nonesuchbase {};
3352 struct __nonesuch :
private __nonesuchbase {
3353 ~__nonesuch() =
delete;
3354 __nonesuch(__nonesuch
const&) =
delete;
3355 void operator=(__nonesuch
const&) =
delete;
3357#pragma GCC diagnostic pop
3360#ifdef __cpp_lib_is_invocable
3362 template<typename _Functor, typename... _ArgTypes>
3363 struct invoke_result
3364 :
public __invoke_result<_Functor, _ArgTypes...>
3366 static_assert(std::__is_complete_or_unbounded(__type_identity<_Functor>{}),
3367 "_Functor must be a complete class or an unbounded array");
3368 static_assert((std::__is_complete_or_unbounded(
3369 __type_identity<_ArgTypes>{}) && ...),
3370 "each argument type must be a complete class or an unbounded array");
3374 template<
typename _Fn,
typename... _Args>
3375 using invoke_result_t =
typename invoke_result<_Fn, _Args...>::type;
3378 template<
typename _Fn,
typename... _ArgTypes>
3380#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_invocable)
3381 :
public __bool_constant<__is_invocable(_Fn, _ArgTypes...)>
3383 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type
3386 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3387 "_Fn must be a complete class or an unbounded array");
3388 static_assert((std::__is_complete_or_unbounded(
3389 __type_identity<_ArgTypes>{}) && ...),
3390 "each argument type must be a complete class or an unbounded array");
3394 template<
typename _Ret,
typename _Fn,
typename... _ArgTypes>
3395 struct is_invocable_r
3396 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>::type
3398 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3399 "_Fn must be a complete class or an unbounded array");
3400 static_assert((std::__is_complete_or_unbounded(
3401 __type_identity<_ArgTypes>{}) && ...),
3402 "each argument type must be a complete class or an unbounded array");
3403 static_assert(std::__is_complete_or_unbounded(__type_identity<_Ret>{}),
3404 "_Ret must be a complete class or an unbounded array");
3408 template<
typename _Fn,
typename... _ArgTypes>
3409 struct is_nothrow_invocable
3410#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_invocable)
3411 :
public __bool_constant<__is_nothrow_invocable(_Fn, _ArgTypes...)>
3413 : __and_<__is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>,
3414 __call_is_nothrow_<_Fn, _ArgTypes...>>::type
3417 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3418 "_Fn must be a complete class or an unbounded array");
3419 static_assert((std::__is_complete_or_unbounded(
3420 __type_identity<_ArgTypes>{}) && ...),
3421 "each argument type must be a complete class or an unbounded array");
3428 template<
typename _Result,
typename _Ret>
3429 using __is_nt_invocable_impl
3430 =
typename __is_invocable_impl<_Result, _Ret>::__nothrow_conv;
3434 template<
typename _Ret,
typename _Fn,
typename... _ArgTypes>
3435 struct is_nothrow_invocable_r
3436 : __and_<__is_nt_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>,
3437 __call_is_nothrow_<_Fn, _ArgTypes...>>::type
3439 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3440 "_Fn must be a complete class or an unbounded array");
3441 static_assert((std::__is_complete_or_unbounded(
3442 __type_identity<_ArgTypes>{}) && ...),
3443 "each argument type must be a complete class or an unbounded array");
3444 static_assert(std::__is_complete_or_unbounded(__type_identity<_Ret>{}),
3445 "_Ret must be a complete class or an unbounded array");
3449#if __cpp_lib_type_trait_variable_templates
3464template <
typename _Tp>
3466template <
typename _Tp>
3467 inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value;
3468template <
typename _Tp>
3470template <
typename _Tp>
3473#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_array)
3474template <
typename _Tp>
3475 inline constexpr bool is_array_v = __is_array(_Tp);
3477template <
typename _Tp>
3478 inline constexpr bool is_array_v =
false;
3479template <
typename _Tp>
3480 inline constexpr bool is_array_v<_Tp[]> =
true;
3481template <
typename _Tp,
size_t _Num>
3482 inline constexpr bool is_array_v<_Tp[_Num]> =
true;
3485#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_pointer)
3486template <
typename _Tp>
3487 inline constexpr bool is_pointer_v = __is_pointer(_Tp);
3489template <
typename _Tp>
3490 inline constexpr bool is_pointer_v =
false;
3491template <
typename _Tp>
3492 inline constexpr bool is_pointer_v<_Tp*> =
true;
3493template <
typename _Tp>
3494 inline constexpr bool is_pointer_v<_Tp* const> =
true;
3495template <
typename _Tp>
3496 inline constexpr bool is_pointer_v<_Tp* volatile> =
true;
3497template <
typename _Tp>
3498 inline constexpr bool is_pointer_v<_Tp* const volatile> =
true;
3501template <
typename _Tp>
3502 inline constexpr bool is_lvalue_reference_v =
false;
3503template <
typename _Tp>
3504 inline constexpr bool is_lvalue_reference_v<_Tp&> =
true;
3505template <
typename _Tp>
3506 inline constexpr bool is_rvalue_reference_v =
false;
3507template <
typename _Tp>
3508 inline constexpr bool is_rvalue_reference_v<_Tp&&> =
true;
3510#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_object_pointer)
3511template <
typename _Tp>
3512 inline constexpr bool is_member_object_pointer_v =
3513 __is_member_object_pointer(_Tp);
3515template <
typename _Tp>
3516 inline constexpr bool is_member_object_pointer_v =
3520#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_function_pointer)
3521template <
typename _Tp>
3522 inline constexpr bool is_member_function_pointer_v =
3523 __is_member_function_pointer(_Tp);
3525template <
typename _Tp>
3526 inline constexpr bool is_member_function_pointer_v =
3530template <
typename _Tp>
3531 inline constexpr bool is_enum_v = __is_enum(_Tp);
3532template <
typename _Tp>
3533 inline constexpr bool is_union_v = __is_union(_Tp);
3534template <
typename _Tp>
3535 inline constexpr bool is_class_v = __is_class(_Tp);
3538#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_reference)
3539template <
typename _Tp>
3540 inline constexpr bool is_reference_v = __is_reference(_Tp);
3542template <
typename _Tp>
3543 inline constexpr bool is_reference_v =
false;
3544template <
typename _Tp>
3545 inline constexpr bool is_reference_v<_Tp&> =
true;
3546template <
typename _Tp>
3547 inline constexpr bool is_reference_v<_Tp&&> =
true;
3550template <
typename _Tp>
3552template <
typename _Tp>
3555#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_object)
3556template <
typename _Tp>
3557 inline constexpr bool is_object_v = __is_object(_Tp);
3559template <
typename _Tp>
3563template <
typename _Tp>
3565template <
typename _Tp>
3566 inline constexpr bool is_compound_v = !is_fundamental_v<_Tp>;
3568#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_pointer)
3569template <
typename _Tp>
3570 inline constexpr bool is_member_pointer_v = __is_member_pointer(_Tp);
3572template <
typename _Tp>
3576#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_const)
3577template <
typename _Tp>
3578 inline constexpr bool is_const_v = __is_const(_Tp);
3580template <
typename _Tp>
3581 inline constexpr bool is_const_v =
false;
3582template <
typename _Tp>
3583 inline constexpr bool is_const_v<const _Tp> =
true;
3586#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_function)
3587template <
typename _Tp>
3588 inline constexpr bool is_function_v = __is_function(_Tp);
3590template <
typename _Tp>
3591 inline constexpr bool is_function_v = !is_const_v<const _Tp>;
3592template <
typename _Tp>
3593 inline constexpr bool is_function_v<_Tp&> =
false;
3594template <
typename _Tp>
3595 inline constexpr bool is_function_v<_Tp&&> =
false;
3598#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_volatile)
3599template <
typename _Tp>
3600 inline constexpr bool is_volatile_v = __is_volatile(_Tp);
3602template <
typename _Tp>
3603 inline constexpr bool is_volatile_v =
false;
3604template <
typename _Tp>
3605 inline constexpr bool is_volatile_v<volatile _Tp> =
true;
3608template <
typename _Tp>
3609 _GLIBCXX26_DEPRECATED_SUGGEST(
"is_trivially_default_constructible_v && is_trivially_copyable_v")
3610 inline constexpr
bool is_trivial_v = __is_trivial(_Tp);
3611template <typename _Tp>
3612 inline constexpr
bool is_trivially_copyable_v = __is_trivially_copyable(_Tp);
3613template <typename _Tp>
3614 inline constexpr
bool is_standard_layout_v = __is_standard_layout(_Tp);
3615template <typename _Tp>
3616 _GLIBCXX20_DEPRECATED_SUGGEST(
"is_standard_layout_v && is_trivial_v")
3617 inline constexpr
bool is_pod_v = __is_pod(_Tp);
3618template <typename _Tp>
3619 _GLIBCXX17_DEPRECATED
3620 inline constexpr
bool is_literal_type_v = __is_literal_type(_Tp);
3621template <typename _Tp>
3622 inline constexpr
bool is_empty_v = __is_empty(_Tp);
3623template <typename _Tp>
3624 inline constexpr
bool is_polymorphic_v = __is_polymorphic(_Tp);
3625template <typename _Tp>
3626 inline constexpr
bool is_abstract_v = __is_abstract(_Tp);
3627template <typename _Tp>
3628 inline constexpr
bool is_final_v = __is_final(_Tp);
3630template <typename _Tp>
3631 inline constexpr
bool is_signed_v =
is_signed<_Tp>::value;
3632template <typename _Tp>
3633 inline constexpr
bool is_unsigned_v =
is_unsigned<_Tp>::value;
3635template <typename _Tp, typename... _Args>
3636 inline constexpr
bool is_constructible_v = __is_constructible(_Tp, _Args...);
3637template <typename _Tp>
3638 inline constexpr
bool is_default_constructible_v = __is_constructible(_Tp);
3639template <typename _Tp>
3640 inline constexpr
bool is_copy_constructible_v
3641 = __is_constructible(_Tp, __add_lval_ref_t<const _Tp>);
3642template <typename _Tp>
3643 inline constexpr
bool is_move_constructible_v
3644 = __is_constructible(_Tp, __add_rval_ref_t<_Tp>);
3646template <typename _Tp, typename _Up>
3647 inline constexpr
bool is_assignable_v = __is_assignable(_Tp, _Up);
3648template <typename _Tp>
3649 inline constexpr
bool is_copy_assignable_v
3650 = __is_assignable(__add_lval_ref_t<_Tp>, __add_lval_ref_t<const _Tp>);
3651template <typename _Tp>
3652 inline constexpr
bool is_move_assignable_v
3653 = __is_assignable(__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>);
3655#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_destructible)
3656template <
typename _Tp>
3657 inline constexpr bool is_destructible_v = __is_destructible(_Tp);
3659template <
typename _Tp>
3663template <
typename _Tp,
typename... _Args>
3664 inline constexpr bool is_trivially_constructible_v
3665 = __is_trivially_constructible(_Tp, _Args...);
3666template <
typename _Tp>
3667 inline constexpr bool is_trivially_default_constructible_v
3668 = __is_trivially_constructible(_Tp);
3669template <
typename _Tp>
3670 inline constexpr bool is_trivially_copy_constructible_v
3671 = __is_trivially_constructible(_Tp, __add_lval_ref_t<const _Tp>);
3672template <
typename _Tp>
3673 inline constexpr bool is_trivially_move_constructible_v
3674 = __is_trivially_constructible(_Tp, __add_rval_ref_t<_Tp>);
3676template <
typename _Tp,
typename _Up>
3677 inline constexpr bool is_trivially_assignable_v
3678 = __is_trivially_assignable(_Tp, _Up);
3679template <
typename _Tp>
3680 inline constexpr bool is_trivially_copy_assignable_v
3681 = __is_trivially_assignable(__add_lval_ref_t<_Tp>,
3682 __add_lval_ref_t<const _Tp>);
3683template <
typename _Tp>
3684 inline constexpr bool is_trivially_move_assignable_v
3685 = __is_trivially_assignable(__add_lval_ref_t<_Tp>,
3686 __add_rval_ref_t<_Tp>);
3688#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_trivially_destructible)
3689template <
typename _Tp>
3690 inline constexpr bool is_trivially_destructible_v
3691 = __is_trivially_destructible(_Tp);
3693template <
typename _Tp>
3694 inline constexpr bool is_trivially_destructible_v =
false;
3696template <
typename _Tp>
3697 requires (!is_reference_v<_Tp>) &&
requires (_Tp& __t) { __t.~_Tp(); }
3698 inline constexpr bool is_trivially_destructible_v<_Tp>
3699 = __has_trivial_destructor(_Tp);
3700template <
typename _Tp>
3701 inline constexpr bool is_trivially_destructible_v<_Tp&> =
true;
3702template <
typename _Tp>
3703 inline constexpr bool is_trivially_destructible_v<_Tp&&> =
true;
3704template <
typename _Tp,
size_t _Nm>
3705 inline constexpr bool is_trivially_destructible_v<_Tp[_Nm]>
3706 = is_trivially_destructible_v<_Tp>;
3708template <
typename _Tp>
3709 inline constexpr bool is_trivially_destructible_v =
3713template <
typename _Tp,
typename... _Args>
3714 inline constexpr bool is_nothrow_constructible_v
3715 = __is_nothrow_constructible(_Tp, _Args...);
3716template <
typename _Tp>
3717 inline constexpr bool is_nothrow_default_constructible_v
3718 = __is_nothrow_constructible(_Tp);
3719template <
typename _Tp>
3720 inline constexpr bool is_nothrow_copy_constructible_v
3721 = __is_nothrow_constructible(_Tp, __add_lval_ref_t<const _Tp>);
3722template <
typename _Tp>
3723 inline constexpr bool is_nothrow_move_constructible_v
3724 = __is_nothrow_constructible(_Tp, __add_rval_ref_t<_Tp>);
3726template <
typename _Tp,
typename _Up>
3727 inline constexpr bool is_nothrow_assignable_v
3728 = __is_nothrow_assignable(_Tp, _Up);
3729template <
typename _Tp>
3730 inline constexpr bool is_nothrow_copy_assignable_v
3731 = __is_nothrow_assignable(__add_lval_ref_t<_Tp>,
3732 __add_lval_ref_t<const _Tp>);
3733template <
typename _Tp>
3734 inline constexpr bool is_nothrow_move_assignable_v
3735 = __is_nothrow_assignable(__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>);
3737#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_destructible)
3738template <
typename _Tp>
3739 inline constexpr bool is_nothrow_destructible_v
3740 = __is_nothrow_destructible(_Tp);
3742template <
typename _Tp>
3743 inline constexpr bool is_nothrow_destructible_v =
3747template <
typename _Tp>
3748 inline constexpr bool has_virtual_destructor_v
3749 = __has_virtual_destructor(_Tp);
3751template <
typename _Tp>
3752 inline constexpr size_t alignment_of_v = alignment_of<_Tp>::value;
3754#if _GLIBCXX_USE_BUILTIN_TRAIT(__array_rank) \
3755 && (!defined(__clang__) || __clang_major__ >= 20)
3756template <
typename _Tp>
3757 inline constexpr size_t rank_v = __array_rank(_Tp);
3759template <
typename _Tp>
3760 inline constexpr size_t rank_v = 0;
3761template <
typename _Tp,
size_t _Size>
3762 inline constexpr size_t rank_v<_Tp[_Size]> = 1 + rank_v<_Tp>;
3763template <
typename _Tp>
3764 inline constexpr size_t rank_v<_Tp[]> = 1 + rank_v<_Tp>;
3767template <
typename _Tp,
unsigned _Idx = 0>
3768 inline constexpr size_t extent_v = 0;
3769template <
typename _Tp,
size_t _Size>
3770 inline constexpr size_t extent_v<_Tp[_Size], 0> = _Size;
3771template <
typename _Tp,
unsigned _Idx,
size_t _Size>
3772 inline constexpr size_t extent_v<_Tp[_Size], _Idx> = extent_v<_Tp, _Idx - 1>;
3773template <
typename _Tp>
3774 inline constexpr size_t extent_v<_Tp[], 0> = 0;
3775template <
typename _Tp,
unsigned _Idx>
3776 inline constexpr size_t extent_v<_Tp[], _Idx> = extent_v<_Tp, _Idx - 1>;
3778#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_same)
3779template <
typename _Tp,
typename _Up>
3780 inline constexpr bool is_same_v = __is_same(_Tp, _Up);
3782template <
typename _Tp,
typename _Up>
3783 inline constexpr bool is_same_v =
false;
3784template <
typename _Tp>
3785 inline constexpr bool is_same_v<_Tp, _Tp> =
true;
3787template <
typename _Base,
typename _Derived>
3788 inline constexpr bool is_base_of_v = __is_base_of(_Base, _Derived);
3789#ifdef __cpp_lib_is_virtual_base_of
3790template <
typename _Base,
typename _Derived>
3791 inline constexpr bool is_virtual_base_of_v = __builtin_is_virtual_base_of(_Base, _Derived);
3793#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_convertible)
3794template <
typename _From,
typename _To>
3795 inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
3797template <
typename _From,
typename _To>
3798 inline constexpr bool is_convertible_v = is_convertible<_From, _To>::value;
3800template<
typename _Fn,
typename... _Args>
3801 inline constexpr bool is_invocable_v
3802#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_invocable)
3803 = __is_invocable(_Fn, _Args...);
3805 = is_invocable<_Fn, _Args...>::value;
3807template<
typename _Fn,
typename... _Args>
3808 inline constexpr bool is_nothrow_invocable_v
3809#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_invocable)
3810 = __is_nothrow_invocable(_Fn, _Args...);
3812 = is_nothrow_invocable<_Fn, _Args...>::value;
3814template<
typename _Ret,
typename _Fn,
typename... _Args>
3815 inline constexpr bool is_invocable_r_v
3816 = is_invocable_r<_Ret, _Fn, _Args...>::value;
3817template<
typename _Ret,
typename _Fn,
typename... _Args>
3818 inline constexpr bool is_nothrow_invocable_r_v
3819 = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value;
3823#ifdef __cpp_lib_has_unique_object_representations
3826 template<typename _Tp>
3827 struct has_unique_object_representations
3828 : bool_constant<__has_unique_object_representations(
3829 remove_cv_t<remove_all_extents_t<_Tp>>
3832 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3833 "template argument must be a complete class or an unbounded array");
3836# if __cpp_lib_type_trait_variable_templates
3838 template<typename _Tp>
3839 inline constexpr bool has_unique_object_representations_v
3840 = has_unique_object_representations<_Tp>::value;
3844#ifdef __cpp_lib_is_aggregate
3847 template<typename _Tp>
3849 : bool_constant<__is_aggregate(remove_cv_t<_Tp>)>
3852# if __cpp_lib_type_trait_variable_templates
3857 template<
typename _Tp>
3858 inline constexpr bool is_aggregate_v = __is_aggregate(remove_cv_t<_Tp>);
3866#ifdef __cpp_lib_remove_cvref
3867# if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_cvref)
3868 template<
typename _Tp>
3870 {
using type = __remove_cvref(_Tp); };
3872 template<
typename _Tp>
3874 {
using type =
typename remove_cv<_Tp>::type; };
3876 template<
typename _Tp>
3877 struct remove_cvref<_Tp&>
3878 {
using type =
typename remove_cv<_Tp>::type; };
3880 template<
typename _Tp>
3881 struct remove_cvref<_Tp&&>
3882 {
using type =
typename remove_cv<_Tp>::type; };
3885 template<
typename _Tp>
3886 using remove_cvref_t =
typename remove_cvref<_Tp>::type;
3890#ifdef __cpp_lib_type_identity
3895 template<
typename _Tp>
3896 struct type_identity {
using type = _Tp; };
3898 template<
typename _Tp>
3899 using type_identity_t =
typename type_identity<_Tp>::type;
3903#ifdef __cpp_lib_unwrap_ref
3908 template<
typename _Tp>
3909 struct unwrap_reference {
using type = _Tp; };
3911 template<
typename _Tp>
3914 template<
typename _Tp>
3915 using unwrap_reference_t =
typename unwrap_reference<_Tp>::type;
3922 template<
typename _Tp>
3923 struct unwrap_ref_decay {
using type = unwrap_reference_t<decay_t<_Tp>>; };
3925 template<
typename _Tp>
3926 using unwrap_ref_decay_t =
typename unwrap_ref_decay<_Tp>::type;
3930#ifdef __cpp_lib_bounded_array_traits
3934# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_bounded_array)
3935 template<
typename _Tp>
3936 inline constexpr bool is_bounded_array_v = __is_bounded_array(_Tp);
3938 template<
typename _Tp>
3939 inline constexpr bool is_bounded_array_v =
false;
3941 template<
typename _Tp,
size_t _Size>
3942 inline constexpr bool is_bounded_array_v<_Tp[_Size]> =
true;
3948# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_unbounded_array)
3949 template<
typename _Tp>
3950 inline constexpr bool is_unbounded_array_v = __is_unbounded_array(_Tp);
3952 template<
typename _Tp>
3953 inline constexpr bool is_unbounded_array_v =
false;
3955 template<
typename _Tp>
3956 inline constexpr bool is_unbounded_array_v<_Tp[]> =
true;
3961 template<
typename _Tp>
3962 struct is_bounded_array
3963 :
public bool_constant<is_bounded_array_v<_Tp>>
3968 template<
typename _Tp>
3969 struct is_unbounded_array
3970 :
public bool_constant<is_unbounded_array_v<_Tp>>
3974#if __has_builtin(__is_layout_compatible) && __cplusplus >= 202002L
3977 template<
typename _Tp,
typename _Up>
3979 : bool_constant<__is_layout_compatible(_Tp, _Up)>
3984 template<
typename _Tp,
typename _Up>
3986 = __is_layout_compatible(_Tp, _Up);
3988#if __has_builtin(__builtin_is_corresponding_member)
3989# ifndef __cpp_lib_is_layout_compatible
3990# error "libstdc++ bug: is_corresponding_member and is_layout_compatible are provided but their FTM is not set"
3994 template<
typename _S1,
typename _S2,
typename _M1,
typename _M2>
3997 {
return __builtin_is_corresponding_member(__m1, __m2); }
4001#if __has_builtin(__is_pointer_interconvertible_base_of) \
4002 && __cplusplus >= 202002L
4005 template<
typename _Base,
typename _Derived>
4007 : bool_constant<__is_pointer_interconvertible_base_of(_Base, _Derived)>
4012 template<
typename _Base,
typename _Derived>
4014 = __is_pointer_interconvertible_base_of(_Base, _Derived);
4016#if __has_builtin(__builtin_is_pointer_interconvertible_with_class)
4017# ifndef __cpp_lib_is_pointer_interconvertible
4018# error "libstdc++ bug: is_pointer_interconvertible available but FTM is not set"
4024 template<
typename _Tp,
typename _Mem>
4027 {
return __builtin_is_pointer_interconvertible_with_class(__mp); }
4031#ifdef __cpp_lib_is_scoped_enum
4035# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_scoped_enum)
4036 template<
typename _Tp>
4037 struct is_scoped_enum
4038 : bool_constant<__is_scoped_enum(_Tp)>
4041 template<
typename _Tp>
4042 struct is_scoped_enum
4046 template<
typename _Tp>
4047 requires __is_enum(_Tp)
4048 &&
requires(remove_cv_t<_Tp> __t) { __t = __t; }
4049 struct is_scoped_enum<_Tp>
4050 : bool_constant<!requires(_Tp __t, void(*__f)(int)) { __f(__t); }>
4056# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_scoped_enum)
4057 template<
typename _Tp>
4058 inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp);
4060 template<
typename _Tp>
4061 inline constexpr bool is_scoped_enum_v = is_scoped_enum<_Tp>::value;
4065#ifdef __cpp_lib_is_implicit_lifetime
4069 template<
typename _Tp>
4070 struct is_implicit_lifetime
4071 : bool_constant<__builtin_is_implicit_lifetime(_Tp)>
4076 template<
typename _Tp>
4077 inline constexpr bool is_implicit_lifetime_v
4078 = __builtin_is_implicit_lifetime(_Tp);
4081#ifdef __cpp_lib_reference_from_temporary
4086 template<typename _Tp, typename _Up>
4087 struct reference_constructs_from_temporary
4088 :
public bool_constant<__reference_constructs_from_temporary(_Tp, _Up)>
4090 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{})
4091 && std::__is_complete_or_unbounded(__type_identity<_Up>{}),
4092 "template argument must be a complete class or an unbounded array");
4099 template<
typename _Tp,
typename _Up>
4100 struct reference_converts_from_temporary
4101 :
public bool_constant<__reference_converts_from_temporary(_Tp, _Up)>
4103 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{})
4104 && std::__is_complete_or_unbounded(__type_identity<_Up>{}),
4105 "template argument must be a complete class or an unbounded array");
4110 template<
typename _Tp,
typename _Up>
4111 inline constexpr bool reference_constructs_from_temporary_v
4112 = reference_constructs_from_temporary<_Tp, _Up>::value;
4116 template<
typename _Tp,
typename _Up>
4117 inline constexpr bool reference_converts_from_temporary_v
4118 = reference_converts_from_temporary<_Tp, _Up>::value;
4121#ifdef __cpp_lib_is_constant_evaluated
4124 [[__gnu__::__always_inline__]]
4126 is_constant_evaluated() noexcept
4128#if __cpp_if_consteval >= 202106L
4129 if consteval {
return true; }
else {
return false; }
4131 return __builtin_is_constant_evaluated();
4136#if __cplusplus >= 202002L
4138 template<
typename _From,
typename _To>
4139 using __copy_cv =
typename __match_cv_qualifiers<_From, _To>::__type;
4141 template<
typename _Xp,
typename _Yp>
4145 template<
typename _Ap,
typename _Bp,
typename =
void>
4146 struct __common_ref_impl
4150 template<
typename _Ap,
typename _Bp>
4151 using __common_ref =
typename __common_ref_impl<_Ap, _Bp>::type;
4154 template<
typename _Xp,
typename _Yp>
4155 using __condres_cvref
4156 = __cond_res<__copy_cv<_Xp, _Yp>&, __copy_cv<_Yp, _Xp>&>;
4159 template<
typename _Xp,
typename _Yp>
4160 struct __common_ref_impl<_Xp&, _Yp&, __void_t<__condres_cvref<_Xp, _Yp>>>
4162 __condres_cvref<_Xp, _Yp>>
4166 template<
typename _Xp,
typename _Yp>
4170 template<
typename _Xp,
typename _Yp>
4171 struct __common_ref_impl<_Xp&&, _Yp&&,
4172 _Require<is_convertible<_Xp&&, __common_ref_C<_Xp, _Yp>>,
4173 is_convertible<_Yp&&, __common_ref_C<_Xp, _Yp>>>>
4174 {
using type = __common_ref_C<_Xp, _Yp>; };
4177 template<
typename _Xp,
typename _Yp>
4178 using __common_ref_D = __common_ref<const _Xp&, _Yp&>;
4181 template<
typename _Xp,
typename _Yp>
4182 struct __common_ref_impl<_Xp&&, _Yp&,
4183 _Require<is_convertible<_Xp&&, __common_ref_D<_Xp, _Yp>>>>
4184 {
using type = __common_ref_D<_Xp, _Yp>; };
4187 template<
typename _Xp,
typename _Yp>
4188 struct __common_ref_impl<_Xp&, _Yp&&>
4189 : __common_ref_impl<_Yp&&, _Xp&>
4193 template<
typename _Tp,
typename _Up,
4194 template<
typename>
class _TQual,
template<
typename>
class _UQual>
4195 struct basic_common_reference
4199 template<
typename _Tp>
4201 {
template<
typename _Up>
using __type = __copy_cv<_Tp, _Up>; };
4203 template<
typename _Tp>
4205 {
template<
typename _Up>
using __type = __copy_cv<_Tp, _Up>&; };
4207 template<
typename _Tp>
4208 struct __xref<_Tp&&>
4209 {
template<
typename _Up>
using __type = __copy_cv<_Tp, _Up>&&; };
4211 template<
typename _Tp1,
typename _Tp2>
4212 using __basic_common_ref
4213 =
typename basic_common_reference<remove_cvref_t<_Tp1>,
4214 remove_cvref_t<_Tp2>,
4215 __xref<_Tp1>::template __type,
4216 __xref<_Tp2>::template __type>::type;
4219 template<
typename... _Tp>
4220 struct common_reference;
4222 template<
typename... _Tp>
4227 struct common_reference<>
4231 template<
typename _Tp0>
4232 struct common_reference<_Tp0>
4233 {
using type = _Tp0; };
4236 template<
typename _Tp1,
typename _Tp2,
int _Bullet = 1>
4237 struct __common_reference_impl
4238 : __common_reference_impl<_Tp1, _Tp2, _Bullet + 1>
4242 template<
typename _Tp1,
typename _Tp2>
4243 struct common_reference<_Tp1, _Tp2>
4244 : __common_reference_impl<_Tp1, _Tp2>
4248 template<
typename _Tp1,
typename _Tp2>
4249 requires is_reference_v<_Tp1> && is_reference_v<_Tp2>
4250 &&
requires {
typename __common_ref<_Tp1, _Tp2>; }
4251#if __cpp_lib_common_reference
4252 && is_convertible_v<add_pointer_t<_Tp1>,
4254 && is_convertible_v<add_pointer_t<_Tp2>,
4257 struct __common_reference_impl<_Tp1, _Tp2, 1>
4258 {
using type = __common_ref<_Tp1, _Tp2>; };
4261 template<
typename _Tp1,
typename _Tp2>
4262 requires requires {
typename __basic_common_ref<_Tp1, _Tp2>; }
4263 struct __common_reference_impl<_Tp1, _Tp2, 2>
4264 {
using type = __basic_common_ref<_Tp1, _Tp2>; };
4267 template<
typename _Tp1,
typename _Tp2>
4268 requires requires {
typename __cond_res<_Tp1, _Tp2>; }
4269 struct __common_reference_impl<_Tp1, _Tp2, 3>
4270 {
using type = __cond_res<_Tp1, _Tp2>; };
4273 template<
typename _Tp1,
typename _Tp2>
4275 struct __common_reference_impl<_Tp1, _Tp2, 4>
4276 {
using type = common_type_t<_Tp1, _Tp2>; };
4279 template<
typename _Tp1,
typename _Tp2>
4280 struct __common_reference_impl<_Tp1, _Tp2, 5>
4284 template<
typename _Tp1,
typename _Tp2,
typename... _Rest>
4285 struct common_reference<_Tp1, _Tp2, _Rest...>
4286 : __common_type_fold<common_reference<_Tp1, _Tp2>,
4287 __common_type_pack<_Rest...>>
4291 template<
typename _Tp1,
typename _Tp2,
typename... _Rest>
4292 struct __common_type_fold<common_reference<_Tp1, _Tp2>,
4293 __common_type_pack<_Rest...>,
4295 :
public common_reference<common_reference_t<_Tp1, _Tp2>, _Rest...>
4301#if __cplusplus >= 201103L
4304 template<
size_t... _Indexes>
struct _Index_tuple { };
4307 template<
size_t _Num>
4308 struct _Build_index_tuple
4310#if __has_builtin(__make_integer_seq)
4311 template<
typename,
size_t... _Indices>
4312 using _IdxTuple = _Index_tuple<_Indices...>;
4315 using __type = __make_integer_seq<_IdxTuple, size_t, _Num>;
4318 using __type = _Index_tuple<__integer_pack(_Num)...>;
4323#ifdef __cpp_lib_constant_wrapper
4324 template<
typename _Tp>
4325 struct _CwFixedValue
4330 _CwFixedValue(__type __v) noexcept
4336 template<
typename _Tp,
size_t _Extent>
4337 struct _CwFixedValue<_Tp[_Extent]>
4339 using __type = _Tp[_Extent];
4342 _CwFixedValue(_Tp (&__arr)[_Extent]) noexcept
4343 : _CwFixedValue(__arr,
typename _Build_index_tuple<_Extent>::__type())
4346 template<
size_t... _Indices>
4348 _CwFixedValue(_Tp (&__arr)[_Extent], _Index_tuple<_Indices...>) noexcept
4349 : _M_data{__arr[_Indices]...}
4352 _Tp _M_data[_Extent];
4355 template<
typename _Tp,
size_t _Extent>
4356 _CwFixedValue(_Tp (&)[_Extent]) -> _CwFixedValue<_Tp[_Extent]>;
4358 template<_CwFixedValue _Xv,
4359 typename =
typename decltype(_CwFixedValue(_Xv))::__type>
4360 struct constant_wrapper;
4362 template<
typename _Tp>
4363 concept _ConstExprParam =
requires
4365 typename constant_wrapper<_Tp::value>;
4370 template<_ConstExprParam _Tp>
4371 friend constexpr auto
4372 operator+(_Tp)
noexcept -> constant_wrapper<(+_Tp::value)>
4375 template<_ConstExprParam _Tp>
4376 friend constexpr auto
4377 operator-(_Tp)
noexcept -> constant_wrapper<(-_Tp::value)>
4380 template<_ConstExprParam _Tp>
4381 friend constexpr auto
4382 operator~(_Tp)
noexcept -> constant_wrapper<(~_Tp::value)>
4385 template<_ConstExprParam _Tp>
4386 friend constexpr auto
4387 operator!(_Tp)
noexcept -> constant_wrapper<(!_Tp::value)>
4390 template<_ConstExprParam _Tp>
4391 friend constexpr auto
4392 operator&(_Tp)
noexcept -> constant_wrapper<(&_Tp::value)>
4395 template<_ConstExprParam _Tp>
4396 friend constexpr auto
4397 operator*(_Tp)
noexcept -> constant_wrapper<(*_Tp::value)>
4400 template<_ConstExprParam _Left, _ConstExprParam _Right>
4401 friend constexpr auto
4403 -> constant_wrapper<(_Left::value + _Right::value)>
4406 template<_ConstExprParam _Left, _ConstExprParam _Right>
4407 friend constexpr auto
4409 -> constant_wrapper<(_Left::value - _Right::value)>
4412 template<_ConstExprParam _Left, _ConstExprParam _Right>
4413 friend constexpr auto
4415 -> constant_wrapper<(_Left::value * _Right::value)>
4418 template<_ConstExprParam _Left, _ConstExprParam _Right>
4419 friend constexpr auto
4421 -> constant_wrapper<(_Left::value / _Right::value)>
4424 template<_ConstExprParam _Left, _ConstExprParam _Right>
4425 friend constexpr auto
4426 operator%(_Left, _Right)
noexcept
4427 -> constant_wrapper<(_Left::value % _Right::value)>
4430 template<_ConstExprParam _Left, _ConstExprParam _Right>
4431 friend constexpr auto
4433 -> constant_wrapper<(_Left::value << _Right::value)>
4436 template<_ConstExprParam _Left, _ConstExprParam _Right>
4437 friend constexpr auto
4439 -> constant_wrapper<(_Left::value >> _Right::value)>
4442 template<_ConstExprParam _Left, _ConstExprParam _Right>
4443 friend constexpr auto
4445 -> constant_wrapper<(_Left::value & _Right::value)>
4448 template<_ConstExprParam _Left, _ConstExprParam _Right>
4449 friend constexpr auto
4451 -> constant_wrapper<(_Left::value | _Right::value)>
4454 template<_ConstExprParam _Left, _ConstExprParam _Right>
4455 friend constexpr auto
4457 -> constant_wrapper<(_Left::value ^ _Right::value)>
4460 template<_ConstExprParam _Left, _ConstExprParam _Right>
4461 requires (!is_constructible_v<bool,
decltype(_Left::value)>
4462 || !is_constructible_v<bool,
decltype(_Right::value)>)
4463 friend constexpr auto
4464 operator&&(_Left, _Right)
noexcept
4465 -> constant_wrapper<(_Left::value && _Right::value)>
4468 template<_ConstExprParam _Left, _ConstExprParam _Right>
4469 requires (!is_constructible_v<bool,
decltype(_Left::value)>
4470 || !is_constructible_v<bool,
decltype(_Right::value)>)
4471 friend constexpr auto
4472 operator||(_Left, _Right)
noexcept
4473 -> constant_wrapper<(_Left::value || _Right::value)>
4476 template<_ConstExprParam _Left, _ConstExprParam _Right>
4477 friend constexpr auto
4478 operator<=>(_Left, _Right)
noexcept
4479 -> constant_wrapper<(_Left::value <=> _Right::value)>
4482 template<_ConstExprParam _Left, _ConstExprParam _Right>
4483 friend constexpr auto
4484 operator<(_Left, _Right)
noexcept
4485 -> constant_wrapper<(_Left::value < _Right::value)>
4488 template<_ConstExprParam _Left, _ConstExprParam _Right>
4489 friend constexpr auto
4490 operator<=(_Left, _Right)
noexcept
4491 -> constant_wrapper<(_Left::value <= _Right::value)>
4494 template<_ConstExprParam _Left, _ConstExprParam _Right>
4495 friend constexpr auto
4496 operator==(_Left, _Right)
noexcept
4497 -> constant_wrapper<(_Left::value == _Right::value)>
4500 template<_ConstExprParam _Left, _ConstExprParam _Right>
4501 friend constexpr auto
4502 operator!=(_Left, _Right)
noexcept
4503 -> constant_wrapper<(_Left::value != _Right::value)>
4506 template<_ConstExprParam _Left, _ConstExprParam _Right>
4507 friend constexpr auto
4508 operator>(_Left, _Right)
noexcept
4509 -> constant_wrapper<(_Left::value > _Right::value)>
4512 template<_ConstExprParam _Left, _ConstExprParam _Right>
4513 friend constexpr auto
4514 operator>=(_Left, _Right)
noexcept
4515 -> constant_wrapper<(_Left::value >= _Right::value)>
4518 template<_ConstExprParam _Left, _ConstExprParam _Right>
4519 friend constexpr auto
4520 operator,(_Left, _Right)
noexcept =
delete;
4522 template<_ConstExprParam _Left, _ConstExprParam _Right>
4523 friend constexpr auto
4524 operator->*(_Left, _Right)
noexcept
4525 -> constant_wrapper<_Left::value->*(_Right::value)>
4528 template<_ConstExprParam _Tp, _ConstExprParam... _Args>
4530 operator()(
this _Tp, _Args...) noexcept
4532 requires(_Args...) { constant_wrapper<_Tp::value(_Args::value...)>(); }
4533 {
return constant_wrapper<_Tp::value(_Args::value...)>{}; }
4535 template<_ConstExprParam _Tp, _ConstExprParam... _Args>
4537 operator[](
this _Tp, _Args...) noexcept
4538 -> constant_wrapper<(_Tp::value[_Args::value...])>
4541 template<_ConstExprParam _Tp>
4543 operator++(
this _Tp)
noexcept
4544 requires requires(_Tp::value_type __x) { ++__x; }
4546 return constant_wrapper<
4547 [] {
auto __x = _Tp::value;
return ++__x; }()>{};
4550 template<_ConstExprParam _Tp>
4552 operator++(
this _Tp,
int)
noexcept
4553 requires requires(_Tp::value_type __x) { __x++; }
4555 return constant_wrapper<
4556 [] {
auto __x = _Tp::value;
return __x++; }()>{};
4559 template<_ConstExprParam _Tp>
4561 operator--(
this _Tp)
noexcept
4562 requires requires(_Tp::value_type __x) { --__x; }
4564 return constant_wrapper<
4565 [] {
auto __x = _Tp::value;
return --__x; }()>{};
4568 template<_ConstExprParam _Tp>
4570 operator--(
this _Tp,
int)
noexcept
4571 requires requires(_Tp::value_type __x) { __x--; }
4573 return constant_wrapper<
4574 [] {
auto __x = _Tp::value;
return __x--; }()>{};
4577 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4579 operator+=(
this _Tp, _Right)
noexcept
4580 requires requires(_Tp::value_type __x) { __x += _Right::value; }
4582 return constant_wrapper<
4583 [] {
auto __x = _Tp::value;
return __x += _Right::value; }()>{};
4586 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4588 operator-=(
this _Tp, _Right)
noexcept
4589 requires requires(_Tp::value_type __x) { __x -= _Right::value; }
4591 return constant_wrapper<
4592 [] {
auto __x = _Tp::value;
return __x -= _Right::value; }()>{};
4595 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4597 operator*=(
this _Tp, _Right)
noexcept
4598 requires requires(_Tp::value_type __x) { __x *= _Right::value; }
4600 return constant_wrapper<
4601 [] {
auto __x = _Tp::value;
return __x *= _Right::value; }()>{};
4604 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4606 operator/=(
this _Tp, _Right)
noexcept
4607 requires requires(_Tp::value_type __x) { __x /= _Right::value; }
4609 return constant_wrapper<
4610 [] {
auto __x = _Tp::value;
return __x /= _Right::value; }()>{};
4613 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4615 operator%=(
this _Tp, _Right)
noexcept
4616 requires requires(_Tp::value_type __x) { __x %= _Right::value; }
4618 return constant_wrapper<
4619 [] {
auto __x = _Tp::value;
return __x %= _Right::value; }()>{};
4622 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4624 operator&=(
this _Tp, _Right)
noexcept
4625 requires requires(_Tp::value_type __x) { __x &= _Right::value; }
4627 return constant_wrapper<
4628 [] {
auto __x = _Tp::value;
return __x &= _Right::value; }()>{};
4631 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4633 operator|=(
this _Tp, _Right)
noexcept
4634 requires requires(_Tp::value_type __x) { __x |= _Right::value; }
4636 return constant_wrapper<
4637 [] {
auto __x = _Tp::value;
return __x |= _Right::value; }()>{};
4640 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4642 operator^=(
this _Tp, _Right)
noexcept
4643 requires requires(_Tp::value_type __x) { __x ^= _Right::value; }
4645 return constant_wrapper<
4646 [] {
auto __x = _Tp::value;
return __x ^= _Right::value; }()>{};
4649 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4651 operator<<=(
this _Tp, _Right)
noexcept
4652 requires requires(_Tp::value_type __x) { __x <<= _Right::value; }
4654 return constant_wrapper<
4655 [] {
auto __x = _Tp::value;
return __x <<= _Right::value; }()>{};
4658 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4660 operator>>=(
this _Tp, _Right)
noexcept
4661 requires requires(_Tp::value_type __x) { __x >>= _Right::value; }
4663 return constant_wrapper<
4664 [] {
auto __x = _Tp::value;
return __x >>= _Right::value; }()>{};
4668 template<_CwFixedValue _Xv,
typename>
4669 struct constant_wrapper : _CwOperators
4671 static constexpr const auto& value = _Xv._M_data;
4672 using type = constant_wrapper;
4673 using value_type =
typename decltype(_Xv)::__type;
4675 template<_ConstExprParam _Right>
4677 operator=(_Right)
const noexcept
4678 requires requires(value_type __x) { __x = _Right::value; }
4680 return constant_wrapper<
4681 [] {
auto __x = value;
return __x = _Right::value; }()>{};
4685 operator decltype(value)()
const noexcept
4689 template<_CwFixedValue _Tp>
4690 constexpr auto cw = constant_wrapper<_Tp>{};
4695_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