29#ifndef _GLIBCXX_TYPE_TRAITS
30#define _GLIBCXX_TYPE_TRAITS 1
33#pragma GCC system_header
36#if __cplusplus < 201103L
42#define __glibcxx_want_bool_constant
43#define __glibcxx_want_bounded_array_traits
44#define __glibcxx_want_common_reference
45#define __glibcxx_want_constant_wrapper
46#define __glibcxx_want_has_unique_object_representations
47#define __glibcxx_want_integral_constant_callable
48#define __glibcxx_want_is_aggregate
49#define __glibcxx_want_is_constant_evaluated
50#define __glibcxx_want_is_final
51#define __glibcxx_want_is_implicit_lifetime
52#define __glibcxx_want_is_invocable
53#define __glibcxx_want_is_layout_compatible
54#define __glibcxx_want_is_nothrow_convertible
55#define __glibcxx_want_is_null_pointer
56#define __glibcxx_want_is_pointer_interconvertible
57#define __glibcxx_want_is_scoped_enum
58#define __glibcxx_want_is_swappable
59#define __glibcxx_want_is_virtual_base_of
60#define __glibcxx_want_logical_traits
61#define __glibcxx_want_reference_from_temporary
62#define __glibcxx_want_remove_cvref
63#define __glibcxx_want_result_of_sfinae
64#define __glibcxx_want_transformation_trait_aliases
65#define __glibcxx_want_type_identity
66#define __glibcxx_want_type_trait_variable_templates
67#define __glibcxx_want_unwrap_ref
68#define __glibcxx_want_void_t
73namespace std _GLIBCXX_VISIBILITY(default)
75_GLIBCXX_BEGIN_NAMESPACE_VERSION
77 template<
typename _Tp>
94 template<
typename _Tp, _Tp __v>
97 static constexpr _Tp value = __v;
98 using value_type = _Tp;
100 constexpr operator value_type()
const noexcept {
return value; }
102#ifdef __cpp_lib_integral_constant_callable
103 constexpr value_type operator()()
const noexcept {
return value; }
107#if ! __cpp_inline_variables
108 template<
typename _Tp, _Tp __v>
109 constexpr _Tp integral_constant<_Tp, __v>::value;
124#ifdef __cpp_lib_bool_constant
128 using bool_constant = __bool_constant<__v>;
135 template<
bool,
typename _Tp =
void>
140 template<
typename _Tp>
142 {
using type = _Tp; };
145 template<
bool _Cond,
typename _Tp =
void>
146 using __enable_if_t =
typename enable_if<_Cond, _Tp>::type;
151 template<
typename _Tp,
typename>
156 struct __conditional<false>
158 template<
typename,
typename _Up>
163 template<
bool _Cond,
typename _If,
typename _Else>
164 using __conditional_t
168 template <
typename _Type>
169 struct __type_identity
170 {
using type = _Type; };
172 template<
typename _Tp>
173 using __type_identity_t =
typename __type_identity<_Tp>::type;
178 template<
typename _Tp,
typename...>
179 using __first_t = _Tp;
182 template<
typename... _Bn>
184 __enable_if_t<!bool(_Bn::value)>...>;
186 template<
typename... _Bn>
189 template<
typename... _Bn>
190 auto __and_fn(
int) -> __first_t<
true_type,
191 __enable_if_t<bool(_Bn::value)>...>;
193 template<
typename... _Bn>
200 template<
typename... _Bn>
202 : decltype(__detail::__or_fn<_Bn...>(0))
205 template<
typename... _Bn>
207 : decltype(__detail::__and_fn<_Bn...>(0))
210 template<
typename _Pp>
212 : __bool_constant<!bool(_Pp::value)>
216#ifdef __cpp_lib_logical_traits
219 template<
typename... _Bn>
220 inline constexpr bool __or_v = __or_<_Bn...>::value;
221 template<
typename... _Bn>
222 inline constexpr bool __and_v = __and_<_Bn...>::value;
226 template<
typename ,
typename _B1,
typename... _Bn>
227 struct __disjunction_impl
228 {
using type = _B1; };
230 template<
typename _B1,
typename _B2,
typename... _Bn>
231 struct __disjunction_impl<__enable_if_t<!bool(_B1::value)>, _B1, _B2, _Bn...>
232 {
using type =
typename __disjunction_impl<void, _B2, _Bn...>::type; };
234 template<
typename ,
typename _B1,
typename... _Bn>
235 struct __conjunction_impl
236 {
using type = _B1; };
238 template<
typename _B1,
typename _B2,
typename... _Bn>
239 struct __conjunction_impl<__enable_if_t<bool(_B1::value)>, _B1, _B2, _Bn...>
240 {
using type =
typename __conjunction_impl<void, _B2, _Bn...>::type; };
244 template<
typename... _Bn>
246 : __detail::__conjunction_impl<void, _Bn...>::type
254 template<
typename... _Bn>
256 : __detail::__disjunction_impl<void, _Bn...>::type
264 template<
typename _Pp>
272 template<
typename... _Bn>
273 inline constexpr bool conjunction_v = conjunction<_Bn...>::value;
275 template<
typename... _Bn>
276 inline constexpr bool disjunction_v = disjunction<_Bn...>::value;
278 template<
typename _Pp>
279 inline constexpr bool negation_v = negation<_Pp>::value;
294 struct __is_array_unknown_bounds;
299 template<
typename _Tp>
300 using __maybe_complete_object_type
301 = __and_<is_object<_Tp>, __not_<__is_array_unknown_bounds<_Tp>>>;
307 template<
typename _Tp,
308 typename = __enable_if_t<__maybe_complete_object_type<_Tp>::value>,
309 size_t =
sizeof(_Tp)>
311 __is_complete_or_unbounded(__type_identity<_Tp>)
316 template<
typename _TypeIdentity,
317 typename _NestedType =
typename _TypeIdentity::type>
318 constexpr typename __not_<__maybe_complete_object_type<_NestedType>>::type
319 __is_complete_or_unbounded(_TypeIdentity)
323 template<
typename _Tp>
324 using __remove_cv_t =
typename remove_cv<_Tp>::type;
330 template<
typename _Tp>
339 struct is_void<const void>
340 :
public true_type { };
347 struct is_void<const volatile void>
356 enum class _Integer_kind { _None, _Signed, _Unsigned };
359 struct __is_integral_helper
361 {
static constexpr auto _S_kind = _Integer_kind::_None; };
364 struct __is_integral_helper<bool>
366 {
static constexpr auto _S_kind = _Integer_kind::_None; };
369 struct __is_integral_helper<char>
371 {
static constexpr auto _S_kind = _Integer_kind::_None; };
374 struct __is_integral_helper<signed char>
376 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
379 struct __is_integral_helper<unsigned char>
381 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
387 struct __is_integral_helper<wchar_t>
389 {
static constexpr auto _S_kind = _Integer_kind::_None; };
391#ifdef _GLIBCXX_USE_CHAR8_T
393 struct __is_integral_helper<char8_t>
395 {
static constexpr auto _S_kind = _Integer_kind::_None; };
399 struct __is_integral_helper<char16_t>
401 {
static constexpr auto _S_kind = _Integer_kind::_None; };
404 struct __is_integral_helper<char32_t>
406 {
static constexpr auto _S_kind = _Integer_kind::_None; };
409 struct __is_integral_helper<short>
411 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
414 struct __is_integral_helper<unsigned short>
416 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
419 struct __is_integral_helper<int>
421 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
424 struct __is_integral_helper<unsigned int>
426 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
429 struct __is_integral_helper<long>
431 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
434 struct __is_integral_helper<unsigned long>
436 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
439 struct __is_integral_helper<long long>
441 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
444 struct __is_integral_helper<unsigned long long>
446 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
450#if defined(__GLIBCXX_TYPE_INT_N_0)
453 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_0>
455 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
459 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_0>
461 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
463#if defined(__GLIBCXX_TYPE_INT_N_1)
466 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_1>
468 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
472 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_1>
474 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
476#if defined(__GLIBCXX_TYPE_INT_N_2)
479 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_2>
481 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
485 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_2>
487 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
489#if defined(__GLIBCXX_TYPE_INT_N_3)
492 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_3>
494 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
498 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_3>
500 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
503#if defined __SIZEOF_INT128__ && defined __STRICT_ANSI__
506 struct __is_integral_helper<__int128>
508 {
static constexpr auto _S_kind = _Integer_kind::_Signed; };
512 struct __is_integral_helper<unsigned __int128>
514 {
static constexpr auto _S_kind = _Integer_kind::_Unsigned; };
518 template<
typename _Tp>
519 using __is_signed_integer
520 = __bool_constant<__is_integral_helper<_Tp>::_S_kind
521 == _Integer_kind::_Signed>;
524 template<
typename _Tp>
525 using __is_unsigned_integer
526 = __bool_constant<__is_integral_helper<_Tp>::_S_kind
527 == _Integer_kind::_Unsigned>;
531 template<
typename _Tp>
532 using __is_signed_or_unsigned_integer
533 = __bool_constant<__is_integral_helper<_Tp>::_S_kind
534 != _Integer_kind::_None>;
539 template<
typename _Tp>
541 :
public __is_integral_helper<__remove_cv_t<_Tp>>
::type
546 struct __is_floating_point_helper
550 struct __is_floating_point_helper<float>
551 :
public true_type { };
554 struct __is_floating_point_helper<double>
558 struct __is_floating_point_helper<long double>
561#ifdef __STDCPP_FLOAT16_T__
563 struct __is_floating_point_helper<_Float16>
567#ifdef __STDCPP_FLOAT32_T__
569 struct __is_floating_point_helper<_Float32>
573#ifdef __STDCPP_FLOAT64_T__
575 struct __is_floating_point_helper<_Float64>
579#ifdef __STDCPP_FLOAT128_T__
581 struct __is_floating_point_helper<_Float128>
585#ifdef __STDCPP_BFLOAT16_T__
587 struct __is_floating_point_helper<__gnu_cxx::__bfloat16_t>
591#ifdef _GLIBCXX_USE_FLOAT128
593 struct __is_floating_point_helper<__float128>
599 template<
typename _Tp>
601 :
public __is_floating_point_helper<__remove_cv_t<_Tp>>
::type
605#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_array)
606 template<
typename _Tp>
608 :
public __bool_constant<__is_array(_Tp)>
615 template<
typename _Tp, std::
size_t _Size>
616 struct is_array<_Tp[_Size]>
617 :
public true_type { };
619 template<
typename _Tp>
625#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_pointer)
626 template<
typename _Tp>
628 :
public __bool_constant<__is_pointer(_Tp)>
631 template<
typename _Tp>
635 template<
typename _Tp>
636 struct is_pointer<_Tp*>
637 :
public true_type { };
639 template<
typename _Tp>
643 template<
typename _Tp>
647 template<
typename _Tp>
657 template<
typename _Tp>
666 template<
typename _Tp>
671#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_object_pointer)
672 template<
typename _Tp>
674 :
public __bool_constant<__is_member_object_pointer(_Tp)>
678 struct __is_member_object_pointer_helper
681 template<
typename _Tp,
typename _Cp>
682 struct __is_member_object_pointer_helper<_Tp _Cp::*>
683 :
public __not_<is_function<_Tp>>::type { };
686 template<
typename _Tp>
688 :
public __is_member_object_pointer_helper<__remove_cv_t<_Tp>>::type
692#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_function_pointer)
694 template<
typename _Tp>
696 :
public __bool_constant<__is_member_function_pointer(_Tp)>
700 struct __is_member_function_pointer_helper
703 template<
typename _Tp,
typename _Cp>
704 struct __is_member_function_pointer_helper<_Tp _Cp::*>
705 :
public is_function<_Tp>::type { };
708 template<
typename _Tp>
710 :
public __is_member_function_pointer_helper<__remove_cv_t<_Tp>>::type
715 template<
typename _Tp>
717 :
public __bool_constant<__is_enum(_Tp)>
721 template<
typename _Tp>
723 :
public __bool_constant<__is_union(_Tp)>
727 template<
typename _Tp>
729 :
public __bool_constant<__is_class(_Tp)>
733#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_function)
734 template<
typename _Tp>
736 :
public __bool_constant<__is_function(_Tp)>
739 template<
typename _Tp>
741 :
public __bool_constant<!is_const<const _Tp>::value> { };
743 template<
typename _Tp>
744 struct is_function<_Tp&>
745 :
public false_type { };
747 template<
typename _Tp>
752#ifdef __cpp_lib_is_null_pointer
754 template<typename _Tp>
755 struct is_null_pointer
759 struct is_null_pointer<std::nullptr_t>
763 struct is_null_pointer<const std::nullptr_t>
767 struct is_null_pointer<volatile std::nullptr_t>
771 struct is_null_pointer<const volatile std::nullptr_t>
776 template<
typename _Tp>
777 struct __is_nullptr_t
778 :
public is_null_pointer<_Tp>
779 { } _GLIBCXX_DEPRECATED_SUGGEST(
"std::is_null_pointer");
785#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_reference)
786 template<
typename _Tp>
788 :
public __bool_constant<__is_reference(_Tp)>
791 template<
typename _Tp>
796 template<
typename _Tp>
797 struct is_reference<_Tp&>
801 template<
typename _Tp>
808 template<
typename _Tp>
810 :
public __or_<is_integral<_Tp>, is_floating_point<_Tp>>
::type
814 template<
typename _Tp>
816 :
public __or_<is_arithmetic<_Tp>, is_void<_Tp>,
817 is_null_pointer<_Tp>>
::type
821#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_object)
822 template<
typename _Tp>
824 :
public __bool_constant<__is_object(_Tp)>
827 template<
typename _Tp>
829 :
public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
835 struct is_member_pointer;
838 template<
typename _Tp>
840 :
public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
841 is_member_pointer<_Tp>, is_null_pointer<_Tp>>
::type
845 template<
typename _Tp>
847 :
public __bool_constant<!is_fundamental<_Tp>::value> { };
850#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_pointer)
851 template<
typename _Tp>
853 :
public __bool_constant<__is_member_pointer(_Tp)>
857 template<
typename _Tp>
858 struct __is_member_pointer_helper
861 template<
typename _Tp,
typename _Cp>
862 struct __is_member_pointer_helper<_Tp _Cp::*>
863 :
public true_type { };
866 template<
typename _Tp>
868 :
public __is_member_pointer_helper<__remove_cv_t<_Tp>>::type
872 template<
typename,
typename>
876 template<
typename _Tp,
typename... _Types>
877 using __is_one_of = __or_<is_same<_Tp, _Types>...>;
880 template<
typename...>
using __void_t = void;
886#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_const)
887 template<
typename _Tp>
889 :
public __bool_constant<__is_const(_Tp)>
896 template<
typename _Tp>
897 struct is_const<_Tp const>
898 :
public true_type { };
902#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_volatile)
903 template<
typename _Tp>
905 :
public __bool_constant<__is_volatile(_Tp)>
912 template<
typename _Tp>
913 struct is_volatile<_Tp volatile>
914 :
public true_type { };
924 template<
typename _Tp>
926 _GLIBCXX26_DEPRECATED_SUGGEST(
"is_trivially_default_constructible && is_trivially_copyable")
928 : public __bool_constant<__is_trivial(_Tp)>
930 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
931 "template argument must be a complete class or an unbounded array");
935 template<
typename _Tp>
937 :
public __bool_constant<__is_trivially_copyable(_Tp)>
939 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
940 "template argument must be a complete class or an unbounded array");
944 template<
typename _Tp>
946 :
public __bool_constant<__is_standard_layout(_Tp)>
948 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
949 "template argument must be a complete class or an unbounded array");
957 template<
typename _Tp>
959 _GLIBCXX20_DEPRECATED_SUGGEST(
"is_standard_layout && is_trivial")
961 : public __bool_constant<__is_pod(_Tp)>
963 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
964 "template argument must be a complete class or an unbounded array");
971 template<
typename _Tp>
973 _GLIBCXX17_DEPRECATED
975 :
public __bool_constant<__is_literal_type(_Tp)>
977 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
978 "template argument must be a complete class or an unbounded array");
982 template<
typename _Tp>
984 :
public __bool_constant<__is_empty(_Tp)>
988 template<
typename _Tp>
990 :
public __bool_constant<__is_polymorphic(_Tp)>
993#ifdef __cpp_lib_is_final
996 template<typename _Tp>
998 :
public __bool_constant<__is_final(_Tp)>
1003 template<
typename _Tp>
1005 :
public __bool_constant<__is_abstract(_Tp)>
1009 template<
typename _Tp,
1011 struct __is_signed_helper
1014 template<
typename _Tp>
1015 struct __is_signed_helper<_Tp, true>
1016 :
public __bool_constant<_Tp(-1) < _Tp(0)>
1021 template<typename _Tp>
1023 : public __is_signed_helper<_Tp>::type
1027 template<typename _Tp>
1029 : public __and_<is_arithmetic<_Tp>, __not_<is_signed<_Tp>>>::type
1033 template<typename _Tp, typename _Up = _Tp&&>
1037 template<typename _Tp>
1042 template<typename _Tp>
1043 auto declval() noexcept -> decltype(__declval<_Tp>(0));
1049 template<typename _Tp>
1050 struct __is_array_known_bounds
1054 template<
typename _Tp,
size_t _Size>
1055 struct __is_array_known_bounds<_Tp[_Size]>
1059 template<
typename _Tp>
1060 struct __is_array_unknown_bounds
1064 template<
typename _Tp>
1065 struct __is_array_unknown_bounds<_Tp[]>
1072#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_destructible)
1074 template<
typename _Tp>
1076 :
public __bool_constant<__is_destructible(_Tp)>
1086 struct __do_is_destructible_impl
1088 template<typename _Tp, typename = decltype(declval<_Tp&>().~_Tp())>
1095 template<
typename _Tp>
1096 struct __is_destructible_impl
1097 :
public __do_is_destructible_impl
1099 using type =
decltype(__test<_Tp>(0));
1102 template<
typename _Tp,
1103 bool = __or_<is_void<_Tp>,
1104 __is_array_unknown_bounds<_Tp>,
1107 struct __is_destructible_safe;
1109 template<
typename _Tp>
1110 struct __is_destructible_safe<_Tp, false, false>
1111 :
public __is_destructible_impl<typename
1112 remove_all_extents<_Tp>::type>::type
1115 template<
typename _Tp>
1116 struct __is_destructible_safe<_Tp, true, false>
1119 template<
typename _Tp>
1120 struct __is_destructible_safe<_Tp, false, true>
1125 template<
typename _Tp>
1127 :
public __is_destructible_safe<_Tp>::type
1129 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1130 "template argument must be a complete class or an unbounded array");
1134#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_destructible)
1136 template<
typename _Tp>
1138 :
public __bool_constant<__is_nothrow_destructible(_Tp)>
1147 struct __do_is_nt_destructible_impl
1149 template<
typename _Tp>
1150 static __bool_constant<noexcept(declval<_Tp&>().~_Tp())>
1157 template<
typename _Tp>
1158 struct __is_nt_destructible_impl
1159 :
public __do_is_nt_destructible_impl
1161 using type =
decltype(__test<_Tp>(0));
1164 template<
typename _Tp,
1165 bool = __or_<is_void<_Tp>,
1166 __is_array_unknown_bounds<_Tp>,
1169 struct __is_nt_destructible_safe;
1171 template<
typename _Tp>
1172 struct __is_nt_destructible_safe<_Tp, false, false>
1173 :
public __is_nt_destructible_impl<typename
1174 remove_all_extents<_Tp>::type>::type
1177 template<
typename _Tp>
1178 struct __is_nt_destructible_safe<_Tp, true, false>
1181 template<
typename _Tp>
1182 struct __is_nt_destructible_safe<_Tp, false, true>
1187 template<
typename _Tp>
1189 :
public __is_nt_destructible_safe<_Tp>::type
1191 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1192 "template argument must be a complete class or an unbounded array");
1197 template<
typename _Tp,
typename... _Args>
1198 using __is_constructible_impl
1199 = __bool_constant<__is_constructible(_Tp, _Args...)>;
1203 template<
typename _Tp,
typename... _Args>
1205 :
public __is_constructible_impl<_Tp, _Args...>
1207 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1208 "template argument must be a complete class or an unbounded array");
1212 template<
typename _Tp>
1214 :
public __is_constructible_impl<_Tp>
1216 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1217 "template argument must be a complete class or an unbounded array");
1221#if _GLIBCXX_USE_BUILTIN_TRAIT(__add_lvalue_reference)
1222 template<
typename _Tp>
1223 using __add_lval_ref_t = __add_lvalue_reference(_Tp);
1225 template<
typename _Tp,
typename =
void>
1226 struct __add_lvalue_reference_helper
1227 {
using type = _Tp; };
1229 template<
typename _Tp>
1230 struct __add_lvalue_reference_helper<_Tp, __void_t<_Tp&>>
1231 {
using type = _Tp&; };
1233 template<
typename _Tp>
1234 using __add_lval_ref_t =
typename __add_lvalue_reference_helper<_Tp>::type;
1239 template<
typename _Tp>
1241 :
public __is_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>>
1243 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1244 "template argument must be a complete class or an unbounded array");
1248#if _GLIBCXX_USE_BUILTIN_TRAIT(__add_rvalue_reference)
1249 template<
typename _Tp>
1250 using __add_rval_ref_t = __add_rvalue_reference(_Tp);
1252 template<
typename _Tp,
typename =
void>
1253 struct __add_rvalue_reference_helper
1254 {
using type = _Tp; };
1256 template<
typename _Tp>
1257 struct __add_rvalue_reference_helper<_Tp, __void_t<_Tp&&>>
1258 {
using type = _Tp&&; };
1260 template<
typename _Tp>
1261 using __add_rval_ref_t =
typename __add_rvalue_reference_helper<_Tp>::type;
1266 template<
typename _Tp>
1268 :
public __is_constructible_impl<_Tp, __add_rval_ref_t<_Tp>>
1270 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1271 "template argument must be a complete class or an unbounded array");
1275 template<
typename _Tp,
typename... _Args>
1276 using __is_nothrow_constructible_impl
1277 = __bool_constant<__is_nothrow_constructible(_Tp, _Args...)>;
1281 template<
typename _Tp,
typename... _Args>
1283 :
public __is_nothrow_constructible_impl<_Tp, _Args...>
1285 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1286 "template argument must be a complete class or an unbounded array");
1290 template<
typename _Tp>
1292 :
public __is_nothrow_constructible_impl<_Tp>
1294 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1295 "template argument must be a complete class or an unbounded array");
1299 template<
typename _Tp>
1301 :
public __is_nothrow_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>>
1303 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1304 "template argument must be a complete class or an unbounded array");
1308 template<
typename _Tp>
1310 :
public __is_nothrow_constructible_impl<_Tp, __add_rval_ref_t<_Tp>>
1312 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1313 "template argument must be a complete class or an unbounded array");
1317 template<
typename _Tp,
typename _Up>
1318 using __is_assignable_impl = __bool_constant<__is_assignable(_Tp, _Up)>;
1322 template<
typename _Tp,
typename _Up>
1324 :
public __is_assignable_impl<_Tp, _Up>
1326 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1327 "template argument must be a complete class or an unbounded array");
1331 template<
typename _Tp>
1333 :
public __is_assignable_impl<__add_lval_ref_t<_Tp>,
1334 __add_lval_ref_t<const _Tp>>
1336 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1337 "template argument must be a complete class or an unbounded array");
1341 template<
typename _Tp>
1343 :
public __is_assignable_impl<__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>>
1345 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1346 "template argument must be a complete class or an unbounded array");
1350 template<
typename _Tp,
typename _Up>
1351 using __is_nothrow_assignable_impl
1352 = __bool_constant<__is_nothrow_assignable(_Tp, _Up)>;
1356 template<
typename _Tp,
typename _Up>
1358 :
public __is_nothrow_assignable_impl<_Tp, _Up>
1360 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1361 "template argument must be a complete class or an unbounded array");
1365 template<
typename _Tp>
1367 :
public __is_nothrow_assignable_impl<__add_lval_ref_t<_Tp>,
1368 __add_lval_ref_t<const _Tp>>
1370 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1371 "template argument must be a complete class or an unbounded array");
1375 template<
typename _Tp>
1377 :
public __is_nothrow_assignable_impl<__add_lval_ref_t<_Tp>,
1378 __add_rval_ref_t<_Tp>>
1380 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1381 "template argument must be a complete class or an unbounded array");
1385 template<
typename _Tp,
typename... _Args>
1386 using __is_trivially_constructible_impl
1387 = __bool_constant<__is_trivially_constructible(_Tp, _Args...)>;
1391 template<
typename _Tp,
typename... _Args>
1393 :
public __is_trivially_constructible_impl<_Tp, _Args...>
1395 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1396 "template argument must be a complete class or an unbounded array");
1400 template<
typename _Tp>
1402 :
public __is_trivially_constructible_impl<_Tp>
1404 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1405 "template argument must be a complete class or an unbounded array");
1408#if __cpp_variable_templates && __cpp_concepts
1409 template<
typename _Tp>
1410 constexpr bool __is_implicitly_default_constructible_v
1411 =
requires (void(&__f)(_Tp)) { __f({}); };
1413 template<
typename _Tp>
1414 struct __is_implicitly_default_constructible
1415 : __bool_constant<__is_implicitly_default_constructible_v<_Tp>>
1418 struct __do_is_implicitly_default_constructible_impl
1420 template <
typename _Tp>
1421 static void __helper(
const _Tp&);
1423 template <
typename _Tp>
1425 decltype(__helper<const _Tp&>({}))* = 0);
1430 template<
typename _Tp>
1431 struct __is_implicitly_default_constructible_impl
1432 :
public __do_is_implicitly_default_constructible_impl
1437 template<
typename _Tp>
1438 struct __is_implicitly_default_constructible_safe
1439 :
public __is_implicitly_default_constructible_impl<_Tp>::type
1442 template <
typename _Tp>
1443 struct __is_implicitly_default_constructible
1444 :
public __and_<__is_constructible_impl<_Tp>,
1445 __is_implicitly_default_constructible_safe<_Tp>>::type
1450 template<
typename _Tp>
1452 :
public __is_trivially_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>>
1454 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1455 "template argument must be a complete class or an unbounded array");
1459 template<
typename _Tp>
1461 :
public __is_trivially_constructible_impl<_Tp, __add_rval_ref_t<_Tp>>
1463 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1464 "template argument must be a complete class or an unbounded array");
1468 template<
typename _Tp,
typename _Up>
1469 using __is_trivially_assignable_impl
1470 = __bool_constant<__is_trivially_assignable(_Tp, _Up)>;
1474 template<
typename _Tp,
typename _Up>
1476 :
public __is_trivially_assignable_impl<_Tp, _Up>
1478 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1479 "template argument must be a complete class or an unbounded array");
1483 template<
typename _Tp>
1485 :
public __is_trivially_assignable_impl<__add_lval_ref_t<_Tp>,
1486 __add_lval_ref_t<const _Tp>>
1488 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1489 "template argument must be a complete class or an unbounded array");
1493 template<
typename _Tp>
1495 :
public __is_trivially_assignable_impl<__add_lval_ref_t<_Tp>,
1496 __add_rval_ref_t<_Tp>>
1498 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1499 "template argument must be a complete class or an unbounded array");
1502#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_trivially_destructible)
1504 template<
typename _Tp>
1506 :
public __bool_constant<__is_trivially_destructible(_Tp)>
1510 template<
typename _Tp>
1512 :
public __and_<__is_destructible_safe<_Tp>,
1513 __bool_constant<__has_trivial_destructor(_Tp)>>
::type
1515 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1516 "template argument must be a complete class or an unbounded array");
1521 template<
typename _Tp>
1523 :
public __bool_constant<__has_virtual_destructor(_Tp)>
1525 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1526 "template argument must be a complete class or an unbounded array");
1533 template<
typename _Tp>
1537 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1538 "template argument must be a complete class or an unbounded array");
1542#if _GLIBCXX_USE_BUILTIN_TRAIT(__array_rank) \
1543 && (!defined(__clang__) || __clang_major__ >= 20)
1544 template<
typename _Tp>
1552 template<
typename _Tp, std::
size_t _Size>
1553 struct rank<_Tp[_Size]>
1554 :
public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
1556 template<
typename _Tp>
1562 template<
typename,
unsigned _U
int = 0>
1566 template<
typename _Tp,
size_t _Size>
1567 struct extent<_Tp[_Size], 0>
1570 template<
typename _Tp,
unsigned _U
int,
size_t _Size>
1571 struct extent<_Tp[_Size], _Uint>
1572 :
public extent<_Tp, _Uint - 1>::type { };
1574 template<
typename _Tp>
1578 template<
typename _Tp,
unsigned _U
int>
1579 struct extent<_Tp[], _Uint>
1580 :
public extent<_Tp, _Uint - 1>::type { };
1586#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_same)
1587 template<
typename _Tp,
typename _Up>
1589 :
public __bool_constant<__is_same(_Tp, _Up)>
1592 template<
typename _Tp,
typename _Up>
1597 template<
typename _Tp>
1598 struct is_same<_Tp, _Tp>
1604 template<
typename _Base,
typename _Derived>
1606 :
public __bool_constant<__is_base_of(_Base, _Derived)>
1609#ifdef __cpp_lib_is_virtual_base_of
1612 template<typename _Base, typename _Derived>
1613 struct is_virtual_base_of
1614 :
public bool_constant<__builtin_is_virtual_base_of(_Base, _Derived)>
1618#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_convertible)
1619 template<
typename _From,
typename _To>
1620 struct is_convertible
1621 :
public __bool_constant<__is_convertible(_From, _To)>
1624 template<
typename _From,
typename _To,
1627 struct __is_convertible_helper
1629 using type =
typename is_void<_To>::type;
1632#pragma GCC diagnostic push
1633#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
1634 template<
typename _From,
typename _To>
1635 class __is_convertible_helper<_From, _To, false>
1637 template<
typename _To1>
1638 static void __test_aux(_To1)
noexcept;
1640 template<
typename _From1,
typename _To1,
1645 template<
typename,
typename>
1650 using type =
decltype(__test<_From, _To>(0));
1652#pragma GCC diagnostic pop
1655 template<
typename _From,
typename _To>
1656 struct is_convertible
1657 :
public __is_convertible_helper<_From, _To>::type
1662 template<
typename _ToElementType,
typename _FromElementType>
1663 using __is_array_convertible
1664 = is_convertible<_FromElementType(*)[], _ToElementType(*)[]>;
1666#ifdef __cpp_lib_is_nothrow_convertible
1668#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_convertible)
1670 template<
typename _From,
typename _To>
1671 inline constexpr bool is_nothrow_convertible_v
1672 = __is_nothrow_convertible(_From, _To);
1675 template<
typename _From,
typename _To>
1676 struct is_nothrow_convertible
1677 :
public bool_constant<is_nothrow_convertible_v<_From, _To>>
1680 template<
typename _From,
typename _To,
1683 struct __is_nt_convertible_helper
1687#pragma GCC diagnostic push
1688#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
1689 template<
typename _From,
typename _To>
1690 class __is_nt_convertible_helper<_From, _To, false>
1692 template<
typename _To1>
1693 static void __test_aux(_To1)
noexcept;
1695 template<
typename _From1,
typename _To1>
1700 template<
typename,
typename>
1705 using type =
decltype(__test<_From, _To>(0));
1707#pragma GCC diagnostic pop
1710 template<
typename _From,
typename _To>
1711 struct is_nothrow_convertible
1712 :
public __is_nt_convertible_helper<_From, _To>::type
1716 template<
typename _From,
typename _To>
1717 inline constexpr bool is_nothrow_convertible_v
1718 = is_nothrow_convertible<_From, _To>::value;
1722#pragma GCC diagnostic push
1723#pragma GCC diagnostic ignored "-Wc++14-extensions"
1724 template<
typename _Tp,
typename... _Args>
1725 struct __is_nothrow_new_constructible_impl
1727 noexcept(::new(std::declval<void*>()) _Tp(std::declval<_Args>()...))
1731 template<
typename _Tp,
typename... _Args>
1732 _GLIBCXX17_INLINE
constexpr bool __is_nothrow_new_constructible
1734 __is_nothrow_new_constructible_impl<_Tp, _Args...>>::value;
1735#pragma GCC diagnostic pop
1740 template<
typename _Tp>
1742 {
using type = _Tp; };
1744 template<
typename _Tp>
1746 {
using type = _Tp; };
1749 template<
typename _Tp>
1751 {
using type = _Tp; };
1753 template<
typename _Tp>
1755 {
using type = _Tp; };
1758#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_cv)
1759 template<
typename _Tp>
1761 {
using type = __remove_cv(_Tp); };
1763 template<
typename _Tp>
1765 {
using type = _Tp; };
1767 template<
typename _Tp>
1768 struct remove_cv<const _Tp>
1769 {
using type = _Tp; };
1771 template<
typename _Tp>
1773 {
using type = _Tp; };
1775 template<
typename _Tp>
1777 {
using type = _Tp; };
1781 template<
typename _Tp>
1783 {
using type = _Tp
const; };
1786 template<
typename _Tp>
1788 {
using type = _Tp
volatile; };
1791 template<
typename _Tp>
1793 {
using type = _Tp
const volatile; };
1795#ifdef __cpp_lib_transformation_trait_aliases
1797 template<typename _Tp>
1798 using remove_const_t =
typename remove_const<_Tp>::type;
1801 template<
typename _Tp>
1802 using remove_volatile_t =
typename remove_volatile<_Tp>::type;
1805 template<
typename _Tp>
1806 using remove_cv_t =
typename remove_cv<_Tp>::type;
1809 template<
typename _Tp>
1810 using add_const_t =
typename add_const<_Tp>::type;
1813 template<
typename _Tp>
1814 using add_volatile_t =
typename add_volatile<_Tp>::type;
1817 template<
typename _Tp>
1818 using add_cv_t =
typename add_cv<_Tp>::type;
1824#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_reference)
1825 template<
typename _Tp>
1827 {
using type = __remove_reference(_Tp); };
1829 template<
typename _Tp>
1831 {
using type = _Tp; };
1833 template<
typename _Tp>
1834 struct remove_reference<_Tp&>
1835 {
using type = _Tp; };
1837 template<
typename _Tp>
1839 {
using type = _Tp; };
1843 template<
typename _Tp>
1845 {
using type = __add_lval_ref_t<_Tp>; };
1848 template<
typename _Tp>
1850 {
using type = __add_rval_ref_t<_Tp>; };
1852#if __cplusplus > 201103L
1854 template<
typename _Tp>
1858 template<
typename _Tp>
1862 template<
typename _Tp>
1871 template<
typename _Unqualified,
bool _IsConst,
bool _IsVol>
1872 struct __cv_selector;
1874 template<
typename _Unqualified>
1875 struct __cv_selector<_Unqualified, false, false>
1876 {
using __type = _Unqualified; };
1878 template<
typename _Unqualified>
1879 struct __cv_selector<_Unqualified, false, true>
1880 {
using __type =
volatile _Unqualified; };
1882 template<
typename _Unqualified>
1883 struct __cv_selector<_Unqualified, true, false>
1884 {
using __type =
const _Unqualified; };
1886 template<
typename _Unqualified>
1887 struct __cv_selector<_Unqualified, true, true>
1888 {
using __type =
const volatile _Unqualified; };
1890 template<
typename _Qualified,
typename _Unqualified,
1893 class __match_cv_qualifiers
1895 using __match = __cv_selector<_Unqualified, _IsConst, _IsVol>;
1898 using __type =
typename __match::__type;
1902 template<
typename _Tp>
1903 struct __make_unsigned
1904 {
using __type = _Tp; };
1907 struct __make_unsigned<char>
1908 {
using __type =
unsigned char; };
1911 struct __make_unsigned<signed char>
1912 {
using __type =
unsigned char; };
1915 struct __make_unsigned<short>
1916 {
using __type =
unsigned short; };
1919 struct __make_unsigned<int>
1920 {
using __type =
unsigned int; };
1923 struct __make_unsigned<long>
1924 {
using __type =
unsigned long; };
1927 struct __make_unsigned<long long>
1928 {
using __type =
unsigned long long; };
1930#if defined(__GLIBCXX_TYPE_INT_N_0)
1933 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_0>
1934 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_0; };
1936#if defined(__GLIBCXX_TYPE_INT_N_1)
1939 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_1>
1940 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_1; };
1942#if defined(__GLIBCXX_TYPE_INT_N_2)
1945 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_2>
1946 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_2; };
1948#if defined(__GLIBCXX_TYPE_INT_N_3)
1951 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_3>
1952 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_3; };
1954#if defined __SIZEOF_INT128__ && defined __STRICT_ANSI__
1957 struct __make_unsigned<__int128>
1958 {
using __type =
unsigned __int128; };
1962 template<
typename _Tp,
1964 bool _IsEnum = __is_enum(_Tp)>
1965 class __make_unsigned_selector;
1967 template<
typename _Tp>
1968 class __make_unsigned_selector<_Tp, true, false>
1970 using __unsigned_type
1971 =
typename __make_unsigned<__remove_cv_t<_Tp>>::__type;
1975 =
typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type;
1978 class __make_unsigned_selector_base
1981 template<
typename...>
struct _List { };
1983 template<
typename _Tp,
typename... _Up>
1984 struct _List<_Tp, _Up...> : _List<_Up...>
1985 {
static constexpr size_t __size =
sizeof(_Tp); };
1987 template<
size_t _Sz,
typename _Tp,
bool = (_Sz <= _Tp::__size)>
1990 template<
size_t _Sz,
typename _U
int,
typename... _UInts>
1991 struct __select<_Sz, _List<_Uint, _UInts...>,
true>
1992 {
using __type = _Uint; };
1994 template<
size_t _Sz,
typename _Uint,
typename... _UInts>
1995 struct __select<_Sz, _List<_Uint, _UInts...>, false>
1996 : __select<_Sz, _List<_UInts...>>
2001 template<
typename _Tp>
2002 class __make_unsigned_selector<_Tp, false, true>
2003 : __make_unsigned_selector_base
2007 using _UInts = _List<
unsigned char,
unsigned short,
unsigned int,
2008 unsigned long,
unsigned long long
2009#ifdef __SIZEOF_INT128__
2014 using __unsigned_type =
typename __select<
sizeof(_Tp), _UInts>::__type;
2018 =
typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type;
2026 struct __make_unsigned<wchar_t>
2029 =
typename __make_unsigned_selector<wchar_t, false, true>::__type;
2032#ifdef _GLIBCXX_USE_CHAR8_T
2034 struct __make_unsigned<char8_t>
2037 =
typename __make_unsigned_selector<char8_t, false, true>::__type;
2042 struct __make_unsigned<char16_t>
2045 =
typename __make_unsigned_selector<char16_t, false, true>::__type;
2049 struct __make_unsigned<char32_t>
2052 =
typename __make_unsigned_selector<char32_t, false, true>::__type;
2060 template<
typename _Tp>
2062 {
using type =
typename __make_unsigned_selector<_Tp>::__type; };
2073 template<
typename _Tp>
2074 struct __make_signed
2075 {
using __type = _Tp; };
2078 struct __make_signed<char>
2079 {
using __type =
signed char; };
2082 struct __make_signed<unsigned char>
2083 {
using __type =
signed char; };
2086 struct __make_signed<unsigned short>
2087 {
using __type =
signed short; };
2090 struct __make_signed<unsigned int>
2091 {
using __type =
signed int; };
2094 struct __make_signed<unsigned long>
2095 {
using __type =
signed long; };
2098 struct __make_signed<unsigned long long>
2099 {
using __type =
signed long long; };
2101#if defined(__GLIBCXX_TYPE_INT_N_0)
2104 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_0>
2105 {
using __type = __GLIBCXX_TYPE_INT_N_0; };
2107#if defined(__GLIBCXX_TYPE_INT_N_1)
2110 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_1>
2111 {
using __type = __GLIBCXX_TYPE_INT_N_1; };
2113#if defined(__GLIBCXX_TYPE_INT_N_2)
2116 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_2>
2117 {
using __type = __GLIBCXX_TYPE_INT_N_2; };
2119#if defined(__GLIBCXX_TYPE_INT_N_3)
2122 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_3>
2123 {
using __type = __GLIBCXX_TYPE_INT_N_3; };
2125#if defined __SIZEOF_INT128__ && defined __STRICT_ANSI__
2128 struct __make_signed<unsigned __int128>
2129 {
using __type = __int128; };
2133 template<
typename _Tp,
2135 bool _IsEnum = __is_enum(_Tp)>
2136 class __make_signed_selector;
2138 template<
typename _Tp>
2139 class __make_signed_selector<_Tp, true, false>
2142 =
typename __make_signed<__remove_cv_t<_Tp>>::__type;
2146 =
typename __match_cv_qualifiers<_Tp, __signed_type>::__type;
2150 template<
typename _Tp>
2151 class __make_signed_selector<_Tp, false, true>
2153 using __unsigned_type =
typename __make_unsigned_selector<_Tp>::__type;
2156 using __type =
typename __make_signed_selector<__unsigned_type>::__type;
2164 struct __make_signed<wchar_t>
2167 =
typename __make_signed_selector<wchar_t, false, true>::__type;
2170#if defined(_GLIBCXX_USE_CHAR8_T)
2172 struct __make_signed<char8_t>
2175 =
typename __make_signed_selector<char8_t, false, true>::__type;
2180 struct __make_signed<char16_t>
2183 =
typename __make_signed_selector<char16_t, false, true>::__type;
2187 struct __make_signed<char32_t>
2190 =
typename __make_signed_selector<char32_t, false, true>::__type;
2198 template<
typename _Tp>
2200 {
using type =
typename __make_signed_selector<_Tp>::__type; };
2206 template<>
struct make_signed<bool const volatile>;
2208#if __cplusplus > 201103L
2210 template<
typename _Tp>
2214 template<
typename _Tp>
2221#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_extent)
2222 template<
typename _Tp>
2224 {
using type = __remove_extent(_Tp); };
2226 template<
typename _Tp>
2228 {
using type = _Tp; };
2230 template<
typename _Tp, std::
size_t _Size>
2231 struct remove_extent<_Tp[_Size]>
2232 {
using type = _Tp; };
2234 template<
typename _Tp>
2236 {
using type = _Tp; };
2240#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_all_extents)
2241 template<
typename _Tp>
2243 {
using type = __remove_all_extents(_Tp); };
2245 template<
typename _Tp>
2247 {
using type = _Tp; };
2249 template<
typename _Tp, std::
size_t _Size>
2250 struct remove_all_extents<_Tp[_Size]>
2251 {
using type =
typename remove_all_extents<_Tp>::type; };
2253 template<
typename _Tp>
2255 {
using type =
typename remove_all_extents<_Tp>::type; };
2258#if __cplusplus > 201103L
2260 template<
typename _Tp>
2264 template<
typename _Tp>
2271#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_pointer)
2272 template<
typename _Tp>
2274 {
using type = __remove_pointer(_Tp); };
2276 template<
typename _Tp,
typename>
2277 struct __remove_pointer_helper
2278 {
using type = _Tp; };
2280 template<
typename _Tp,
typename _Up>
2281 struct __remove_pointer_helper<_Tp, _Up*>
2282 {
using type = _Up; };
2284 template<
typename _Tp>
2286 :
public __remove_pointer_helper<_Tp, __remove_cv_t<_Tp>>
2291#if _GLIBCXX_USE_BUILTIN_TRAIT(__add_pointer)
2292 template<
typename _Tp>
2294 {
using type = __add_pointer(_Tp); };
2296 template<
typename _Tp,
typename =
void>
2297 struct __add_pointer_helper
2298 {
using type = _Tp; };
2300 template<
typename _Tp>
2301 struct __add_pointer_helper<_Tp, __void_t<_Tp*>>
2302 {
using type = _Tp*; };
2304 template<
typename _Tp>
2306 :
public __add_pointer_helper<_Tp>
2309 template<
typename _Tp>
2311 {
using type = _Tp*; };
2313 template<
typename _Tp>
2315 {
using type = _Tp*; };
2318#if __cplusplus > 201103L
2320 template<
typename _Tp>
2324 template<
typename _Tp>
2331 struct __attribute__((__aligned__)) __aligned_storage_max_align_t
2335 __aligned_storage_default_alignment([[__maybe_unused__]]
size_t __len)
2337#if _GLIBCXX_INLINE_VERSION
2339 = integral_constant<size_t,
alignof(__aligned_storage_max_align_t)>;
2341 return __len > (_Max_align::value / 2)
2343#
if _GLIBCXX_USE_BUILTIN_TRAIT(__builtin_clzg)
2344 : 1 << (__SIZE_WIDTH__ - __builtin_clzg(__len - 1u));
2346 : 1 << (__LLONG_WIDTH__ - __builtin_clzll(__len - 1ull));
2351 return alignof(__aligned_storage_max_align_t);
2387 template<
size_t _Len,
2388 size_t _Align = __aligned_storage_default_alignment(_Len)>
2390 _GLIBCXX23_DEPRECATED
2395 alignas(_Align)
unsigned char __data[_Len];
2399 template <
typename... _Types>
2400 struct __strictest_alignment
2402 static const size_t _S_alignment = 0;
2403 static const size_t _S_size = 0;
2406 template <
typename _Tp,
typename... _Types>
2407 struct __strictest_alignment<_Tp, _Types...>
2409 static const size_t _S_alignment =
2410 alignof(_Tp) > __strictest_alignment<_Types...>::_S_alignment
2411 ?
alignof(_Tp) : __strictest_alignment<_Types...>::_S_alignment;
2412 static const size_t _S_size =
2413 sizeof(_Tp) > __strictest_alignment<_Types...>::_S_size
2414 ?
sizeof(_Tp) : __strictest_alignment<_Types...>::_S_size;
2417#pragma GCC diagnostic push
2418#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2432 template <
size_t _Len,
typename... _Types>
2434 _GLIBCXX23_DEPRECATED
2438 static_assert(
sizeof...(_Types) != 0,
"At least one type is required");
2440 using __strictest = __strictest_alignment<_Types...>;
2441 static const size_t _S_len = _Len > __strictest::_S_size
2442 ? _Len : __strictest::_S_size;
2447 using type =
typename aligned_storage<_S_len, alignment_value>::type;
2450 template <
size_t _Len,
typename... _Types>
2451 const size_t aligned_union<_Len, _Types...>::alignment_value;
2452#pragma GCC diagnostic pop
2456#if _GLIBCXX_USE_BUILTIN_TRAIT(__decay)
2457 template<
typename _Tp>
2459 {
using type = __decay(_Tp); };
2463 template<
typename _Up>
2464 struct __decay_selector
2465 : __conditional_t<is_const<const _Up>::value,
2470 template<
typename _Up,
size_t _Nm>
2471 struct __decay_selector<_Up[_Nm]>
2472 {
using type = _Up*; };
2474 template<
typename _Up>
2475 struct __decay_selector<_Up[]>
2476 {
using type = _Up*; };
2481 template<
typename _Tp>
2483 {
using type =
typename __decay_selector<_Tp>::type; };
2485 template<
typename _Tp>
2487 {
using type =
typename __decay_selector<_Tp>::type; };
2489 template<
typename _Tp>
2491 {
using type =
typename __decay_selector<_Tp>::type; };
2497 template<
typename _Tp>
2498 struct __strip_reference_wrapper
2503 template<
typename _Tp>
2506 using __type = _Tp&;
2510 template<
typename _Tp>
2511 using __decay_t =
typename decay<_Tp>::type;
2513 template<
typename _Tp>
2514 using __decay_and_strip = __strip_reference_wrapper<__decay_t<_Tp>>;
2520 template<
typename... _Cond>
2521 using _Require = __enable_if_t<__and_<_Cond...>::value>;
2524 template<
typename _Tp>
2525 using __remove_cvref_t
2531 template<
bool _Cond,
typename _Iftrue,
typename _Iffalse>
2533 {
using type = _Iftrue; };
2536 template<
typename _Iftrue,
typename _Iffalse>
2538 {
using type = _Iffalse; };
2541 template<
typename... _Tp>
2553 template<
typename _Tp>
2554 struct __success_type
2555 {
using type = _Tp; };
2557 struct __failure_type
2560 struct __do_common_type_impl
2562 template<
typename _Tp,
typename _Up>
2568 template<
typename _Tp,
typename _Up>
2569 static __success_type<__decay_t<__cond_t<_Tp, _Up>>>
2572#if __cplusplus > 201703L
2575 template<
typename _Tp,
typename _Up>
2576 static __success_type<__remove_cvref_t<__cond_t<const _Tp&, const _Up&>>>
2580 template<
typename,
typename>
2581 static __failure_type
2584 template<
typename _Tp,
typename _Up>
2585 static decltype(_S_test_2<_Tp, _Up>(0))
2595 template<
typename _Tp0>
2601 template<
typename _Tp1,
typename _Tp2,
2602 typename _Dp1 = __decay_t<_Tp1>,
typename _Dp2 = __decay_t<_Tp2>>
2603 struct __common_type_impl
2607 using type = common_type<_Dp1, _Dp2>;
2610 template<
typename _Tp1,
typename _Tp2>
2611 struct __common_type_impl<_Tp1, _Tp2, _Tp1, _Tp2>
2612 :
private __do_common_type_impl
2616 using type =
decltype(_S_test<_Tp1, _Tp2>(0));
2620 template<
typename _Tp1,
typename _Tp2>
2622 :
public __common_type_impl<_Tp1, _Tp2>::type
2625 template<
typename...>
2626 struct __common_type_pack
2629 template<
typename,
typename,
typename =
void>
2630 struct __common_type_fold;
2633 template<
typename _Tp1,
typename _Tp2,
typename... _Rp>
2635 :
public __common_type_fold<common_type<_Tp1, _Tp2>,
2636 __common_type_pack<_Rp...>>
2642 template<
typename _CTp,
typename... _Rp>
2643 struct __common_type_fold<_CTp, __common_type_pack<_Rp...>,
2644 __void_t<typename _CTp::
type>>
2649 template<
typename _CTp,
typename _Rp>
2650 struct __common_type_fold<_CTp, _Rp, void>
2653 template<
typename _Tp,
bool = __is_enum(_Tp)>
2654 struct __underlying_type_impl
2656 using type = __underlying_type(_Tp);
2659 template<
typename _Tp>
2660 struct __underlying_type_impl<_Tp, false>
2665 template<
typename _Tp>
2667 :
public __underlying_type_impl<_Tp>
2671 template<
typename _Tp>
2672 struct __declval_protector
2674 static const bool __stop =
false;
2682 template<
typename _Tp>
2683 auto declval() noexcept -> decltype(__declval<_Tp>(0))
2685 static_assert(__declval_protector<_Tp>::__stop,
2686 "declval() must not be used!");
2687 return __declval<_Tp>(0);
2691 template<
typename _Signature>
2697 struct __invoke_memfun_ref { };
2698 struct __invoke_memfun_deref { };
2699 struct __invoke_memobj_ref { };
2700 struct __invoke_memobj_deref { };
2701 struct __invoke_other { };
2704 template<
typename _Tp,
typename _Tag>
2705 struct __result_of_success : __success_type<_Tp>
2706 {
using __invoke_type = _Tag; };
2709 struct __result_of_memfun_ref_impl
2711 template<
typename _Fp,
typename _Tp1,
typename... _Args>
2712 static __result_of_success<
decltype(
2714 ), __invoke_memfun_ref> _S_test(
int);
2716 template<
typename...>
2717 static __failure_type _S_test(...);
2720 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2721 struct __result_of_memfun_ref
2722 :
private __result_of_memfun_ref_impl
2724 using type =
decltype(_S_test<_MemPtr, _Arg, _Args...>(0));
2728 struct __result_of_memfun_deref_impl
2730 template<
typename _Fp,
typename _Tp1,
typename... _Args>
2731 static __result_of_success<
decltype(
2733 ), __invoke_memfun_deref> _S_test(
int);
2735 template<
typename...>
2736 static __failure_type _S_test(...);
2739 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2740 struct __result_of_memfun_deref
2741 :
private __result_of_memfun_deref_impl
2743 using type =
decltype(_S_test<_MemPtr, _Arg, _Args...>(0));
2747 struct __result_of_memobj_ref_impl
2749 template<
typename _Fp,
typename _Tp1>
2750 static __result_of_success<
decltype(
2752 ), __invoke_memobj_ref> _S_test(
int);
2754 template<
typename,
typename>
2755 static __failure_type _S_test(...);
2758 template<
typename _MemPtr,
typename _Arg>
2759 struct __result_of_memobj_ref
2760 :
private __result_of_memobj_ref_impl
2762 using type =
decltype(_S_test<_MemPtr, _Arg>(0));
2766 struct __result_of_memobj_deref_impl
2768 template<
typename _Fp,
typename _Tp1>
2769 static __result_of_success<
decltype(
2771 ), __invoke_memobj_deref> _S_test(
int);
2773 template<
typename,
typename>
2774 static __failure_type _S_test(...);
2777 template<
typename _MemPtr,
typename _Arg>
2778 struct __result_of_memobj_deref
2779 :
private __result_of_memobj_deref_impl
2781 using type =
decltype(_S_test<_MemPtr, _Arg>(0));
2784 template<
typename _MemPtr,
typename _Arg>
2785 struct __result_of_memobj;
2787 template<
typename _Res,
typename _Class,
typename _Arg>
2788 struct __result_of_memobj<_Res _Class::*, _Arg>
2790 using _Argval = __remove_cvref_t<_Arg>;
2791 using _MemPtr = _Res _Class::*;
2792 using type =
typename __conditional_t<__or_<is_same<_Argval, _Class>,
2793 is_base_of<_Class, _Argval>>::value,
2794 __result_of_memobj_ref<_MemPtr, _Arg>,
2795 __result_of_memobj_deref<_MemPtr, _Arg>
2799 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2800 struct __result_of_memfun;
2802 template<
typename _Res,
typename _Class,
typename _Arg,
typename... _Args>
2803 struct __result_of_memfun<_Res _Class::*, _Arg, _Args...>
2805 using _Argval =
typename remove_reference<_Arg>::type;
2806 using _MemPtr = _Res _Class::*;
2807 using type =
typename __conditional_t<is_base_of<_Class, _Argval>::value,
2808 __result_of_memfun_ref<_MemPtr, _Arg, _Args...>,
2809 __result_of_memfun_deref<_MemPtr, _Arg, _Args...>
2818 template<
typename _Tp,
typename _Up = __remove_cvref_t<_Tp>>
2824 template<
typename _Tp,
typename _Up>
2830 template<bool, bool,
typename _Functor,
typename... _ArgTypes>
2831 struct __result_of_impl
2833 using type = __failure_type;
2836 template<
typename _MemPtr,
typename _Arg>
2837 struct __result_of_impl<true, false, _MemPtr, _Arg>
2838 :
public __result_of_memobj<__decay_t<_MemPtr>,
2839 typename __inv_unwrap<_Arg>::type>
2842 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2843 struct __result_of_impl<false, true, _MemPtr, _Arg, _Args...>
2844 :
public __result_of_memfun<__decay_t<_MemPtr>,
2845 typename __inv_unwrap<_Arg>::type, _Args...>
2849 struct __result_of_other_impl
2851 template<
typename _Fn,
typename... _Args>
2852 static __result_of_success<
decltype(
2854 ), __invoke_other> _S_test(
int);
2856 template<
typename...>
2857 static __failure_type _S_test(...);
2860 template<
typename _Functor,
typename... _ArgTypes>
2861 struct __result_of_impl<false, false, _Functor, _ArgTypes...>
2862 :
private __result_of_other_impl
2864 using type =
decltype(_S_test<_Functor, _ArgTypes...>(0));
2868 template<
typename _Functor,
typename... _ArgTypes>
2869 struct __invoke_result
2870 :
public __result_of_impl<
2871 is_member_object_pointer<
2872 typename remove_reference<_Functor>::type
2874 is_member_function_pointer<
2875 typename remove_reference<_Functor>::type
2877 _Functor, _ArgTypes...
2882 template<
typename _Fn,
typename... _Args>
2883 using __invoke_result_t =
typename __invoke_result<_Fn, _Args...>::type;
2886 template<
typename _Functor,
typename... _ArgTypes>
2887 struct result_of<_Functor(_ArgTypes...)>
2888 :
public __invoke_result<_Functor, _ArgTypes...>
2889 { } _GLIBCXX17_DEPRECATED_SUGGEST(
"std::invoke_result");
2891#if __cplusplus >= 201402L
2892#pragma GCC diagnostic push
2893#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2895 template<
size_t _Len,
2896 size_t _Align = __aligned_storage_default_alignment(_Len)>
2897 using aligned_storage_t _GLIBCXX23_DEPRECATED =
typename aligned_storage<_Len, _Align>::type;
2899 template <
size_t _Len,
typename... _Types>
2900 using aligned_union_t _GLIBCXX23_DEPRECATED =
typename aligned_union<_Len, _Types...>
::type;
2901#pragma GCC diagnostic pop
2904 template<
typename _Tp>
2905 using decay_t =
typename decay<_Tp>::type;
2908 template<
bool _Cond,
typename _Tp =
void>
2912 template<
bool _Cond,
typename _Iftrue,
typename _Iffalse>
2913 using conditional_t =
typename conditional<_Cond, _Iftrue, _Iffalse>::type;
2916 template<
typename... _Tp>
2920 template<
typename _Tp>
2924 template<
typename _Tp>
2928#ifdef __cpp_lib_void_t
2930 template<typename...> using void_t = void;
2940 template<
typename _Def,
template<
typename...>
class _Op,
typename... _Args>
2941 struct __detected_or
2948 template<
typename _Def,
template<
typename...>
class _Op,
typename... _Args>
2949 requires requires {
typename _Op<_Args...>; }
2950 struct __detected_or<_Def, _Op, _Args...>
2952 using type = _Op<_Args...>;
2957 template<
typename _Default,
typename _AlwaysVoid,
2958 template<
typename...>
class _Op,
typename... _Args>
2961 using type = _Default;
2966 template<
typename _Default,
template<
typename...>
class _Op,
2968 struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...>
2970 using type = _Op<_Args...>;
2974 template<
typename _Default,
template<
typename...>
class _Op,
2976 using __detected_or = __detector<_Default, void, _Op, _Args...>;
2980 template<
typename _Default,
template<
typename...>
class _Op,
2982 using __detected_or_t
2983 =
typename __detected_or<_Default, _Op, _Args...>::type;
2989#define _GLIBCXX_HAS_NESTED_TYPE(_NTYPE) \
2990 template<typename _Tp, typename = __void_t<>> \
2991 struct __has_##_NTYPE \
2994 template<typename _Tp> \
2995 struct __has_##_NTYPE<_Tp, __void_t<typename _Tp::_NTYPE>> \
2999 template <
typename _Tp>
3000 struct __is_swappable;
3002 template <
typename _Tp>
3003 struct __is_nothrow_swappable;
3010 template<
typename _Tp>
3011 struct __is_tuple_like
3012 :
public __is_tuple_like_impl<__remove_cvref_t<_Tp>>::type
3016 template<
typename _Tp>
3017 _GLIBCXX20_CONSTEXPR
3019 _Require<__not_<__is_tuple_like<_Tp>>,
3023 noexcept(__and_<is_nothrow_move_constructible<_Tp>,
3026 template<
typename _Tp,
size_t _Nm>
3027 _GLIBCXX20_CONSTEXPR
3029 __enable_if_t<__is_swappable<_Tp>::value>
3030 swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
3031 noexcept(__is_nothrow_swappable<_Tp>::value);
3034 namespace __swappable_details {
3037 struct __do_is_swappable_impl
3039 template<
typename _Tp,
typename
3041 static true_type __test(
int);
3047 struct __do_is_nothrow_swappable_impl
3049 template<
typename _Tp>
3050 static __bool_constant<
3060 template<
typename _Tp>
3061 struct __is_swappable_impl
3062 :
public __swappable_details::__do_is_swappable_impl
3064 using type =
decltype(__test<_Tp>(0));
3067 template<
typename _Tp>
3068 struct __is_nothrow_swappable_impl
3069 :
public __swappable_details::__do_is_nothrow_swappable_impl
3071 using type =
decltype(__test<_Tp>(0));
3074 template<
typename _Tp>
3075 struct __is_swappable
3076 :
public __is_swappable_impl<_Tp>::type
3079 template<
typename _Tp>
3080 struct __is_nothrow_swappable
3081 :
public __is_nothrow_swappable_impl<_Tp>::type
3085#ifdef __cpp_lib_is_swappable
3089 template<
typename _Tp>
3091 :
public __is_swappable_impl<_Tp>::type
3093 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3094 "template argument must be a complete class or an unbounded array");
3098 template<
typename _Tp>
3099 struct is_nothrow_swappable
3100 :
public __is_nothrow_swappable_impl<_Tp>::type
3102 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3103 "template argument must be a complete class or an unbounded array");
3106#if __cplusplus >= 201402L
3108 template<
typename _Tp>
3109 _GLIBCXX17_INLINE
constexpr bool is_swappable_v =
3110 is_swappable<_Tp>::value;
3113 template<
typename _Tp>
3114 _GLIBCXX17_INLINE
constexpr bool is_nothrow_swappable_v =
3115 is_nothrow_swappable<_Tp>::value;
3119 namespace __swappable_with_details {
3122 struct __do_is_swappable_with_impl
3124 template<
typename _Tp,
typename _Up,
typename
3130 template<
typename,
typename>
3134 struct __do_is_nothrow_swappable_with_impl
3136 template<
typename _Tp,
typename _Up>
3137 static __bool_constant<
3143 template<
typename,
typename>
3149 template<
typename _Tp,
typename _Up>
3150 struct __is_swappable_with_impl
3151 :
public __swappable_with_details::__do_is_swappable_with_impl
3153 using type =
decltype(__test<_Tp, _Up>(0));
3157 template<
typename _Tp>
3158 struct __is_swappable_with_impl<_Tp&, _Tp&>
3159 :
public __swappable_details::__do_is_swappable_impl
3161 using type =
decltype(__test<_Tp&>(0));
3164 template<
typename _Tp,
typename _Up>
3165 struct __is_nothrow_swappable_with_impl
3166 :
public __swappable_with_details::__do_is_nothrow_swappable_with_impl
3168 using type =
decltype(__test<_Tp, _Up>(0));
3172 template<
typename _Tp>
3173 struct __is_nothrow_swappable_with_impl<_Tp&, _Tp&>
3174 :
public __swappable_details::__do_is_nothrow_swappable_impl
3176 using type =
decltype(__test<_Tp&>(0));
3181 template<
typename _Tp,
typename _Up>
3182 struct is_swappable_with
3183 :
public __is_swappable_with_impl<_Tp, _Up>::type
3185 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3186 "first template argument must be a complete class or an unbounded array");
3187 static_assert(std::__is_complete_or_unbounded(__type_identity<_Up>{}),
3188 "second template argument must be a complete class or an unbounded array");
3192 template<
typename _Tp,
typename _Up>
3193 struct is_nothrow_swappable_with
3194 :
public __is_nothrow_swappable_with_impl<_Tp, _Up>::type
3196 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3197 "first template argument must be a complete class or an unbounded array");
3198 static_assert(std::__is_complete_or_unbounded(__type_identity<_Up>{}),
3199 "second template argument must be a complete class or an unbounded array");
3202#if __cplusplus >= 201402L
3204 template<
typename _Tp,
typename _Up>
3205 _GLIBCXX17_INLINE
constexpr bool is_swappable_with_v =
3206 is_swappable_with<_Tp, _Up>::value;
3209 template<
typename _Tp,
typename _Up>
3210 _GLIBCXX17_INLINE
constexpr bool is_nothrow_swappable_with_v =
3211 is_nothrow_swappable_with<_Tp, _Up>::value;
3221 template<
typename _Result,
typename _Ret,
3223 struct __is_invocable_impl
3230 template<
typename _Result,
typename _Ret>
3231 struct __is_invocable_impl<_Result, _Ret,
3233 __void_t<typename _Result::
type>>
3239#pragma GCC diagnostic push
3240#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
3242 template<
typename _Result,
typename _Ret>
3243 struct __is_invocable_impl<_Result, _Ret,
3245 __void_t<typename _Result::
type>>
3249 using _Res_t =
typename _Result::type;
3253 static _Res_t _S_get() noexcept;
3256 template<typename _Tp>
3257 static
void _S_conv(__type_identity_t<_Tp>) noexcept;
3260 template<typename _Tp,
3261 bool _Nothrow = noexcept(_S_conv<_Tp>(_S_get())),
3262 typename = decltype(_S_conv<_Tp>(_S_get())),
3263#if __has_builtin(__reference_converts_from_temporary)
3264 bool _Dangle = __reference_converts_from_temporary(_Tp, _Res_t)
3266 bool _Dangle =
false
3269 static __bool_constant<_Nothrow && !_Dangle>
3272 template<
typename _Tp,
bool = false>
3278 using type =
decltype(_S_test<_Ret,
true>(1));
3281 using __nothrow_conv =
decltype(_S_test<_Ret>(1));
3283#pragma GCC diagnostic pop
3285 template<
typename _Fn,
typename... _ArgTypes>
3286 struct __is_invocable
3287#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_invocable)
3288 : __bool_constant<__is_invocable(_Fn, _ArgTypes...)>
3290 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type
3294 template<
typename _Fn,
typename _Tp,
typename... _Args>
3295 constexpr bool __call_is_nt(__invoke_memfun_ref)
3297 using _Up =
typename __inv_unwrap<_Tp>::type;
3302 template<
typename _Fn,
typename _Tp,
typename... _Args>
3303 constexpr bool __call_is_nt(__invoke_memfun_deref)
3309 template<
typename _Fn,
typename _Tp>
3310 constexpr bool __call_is_nt(__invoke_memobj_ref)
3312 using _Up =
typename __inv_unwrap<_Tp>::type;
3316 template<
typename _Fn,
typename _Tp>
3317 constexpr bool __call_is_nt(__invoke_memobj_deref)
3322 template<
typename _Fn,
typename... _Args>
3323 constexpr bool __call_is_nt(__invoke_other)
3328 template<
typename _Result,
typename _Fn,
typename... _Args>
3329 struct __call_is_nothrow
3331 std::__call_is_nt<_Fn, _Args...>(typename _Result::__invoke_type{})
3335 template<
typename _Fn,
typename... _Args>
3336 using __call_is_nothrow_
3337 = __call_is_nothrow<__invoke_result<_Fn, _Args...>, _Fn, _Args...>;
3340 template<
typename _Fn,
typename... _Args>
3341 struct __is_nothrow_invocable
3342#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_invocable)
3343 : __bool_constant<__is_nothrow_invocable(_Fn, _Args...)>
3345 : __and_<__is_invocable<_Fn, _Args...>,
3346 __call_is_nothrow_<_Fn, _Args...>>::type
3350#pragma GCC diagnostic push
3351#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
3352 struct __nonesuchbase {};
3353 struct __nonesuch :
private __nonesuchbase {
3354 ~__nonesuch() =
delete;
3355 __nonesuch(__nonesuch
const&) =
delete;
3356 void operator=(__nonesuch
const&) =
delete;
3358#pragma GCC diagnostic pop
3361#ifdef __cpp_lib_is_invocable
3363 template<typename _Functor, typename... _ArgTypes>
3364 struct invoke_result
3365 :
public __invoke_result<_Functor, _ArgTypes...>
3367 static_assert(std::__is_complete_or_unbounded(__type_identity<_Functor>{}),
3368 "_Functor must be a complete class or an unbounded array");
3369 static_assert((std::__is_complete_or_unbounded(
3370 __type_identity<_ArgTypes>{}) && ...),
3371 "each argument type must be a complete class or an unbounded array");
3375 template<
typename _Fn,
typename... _Args>
3376 using invoke_result_t =
typename invoke_result<_Fn, _Args...>::type;
3379 template<
typename _Fn,
typename... _ArgTypes>
3381#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_invocable)
3382 :
public __bool_constant<__is_invocable(_Fn, _ArgTypes...)>
3384 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type
3387 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3388 "_Fn must be a complete class or an unbounded array");
3389 static_assert((std::__is_complete_or_unbounded(
3390 __type_identity<_ArgTypes>{}) && ...),
3391 "each argument type must be a complete class or an unbounded array");
3395 template<
typename _Ret,
typename _Fn,
typename... _ArgTypes>
3396 struct is_invocable_r
3397 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>::type
3399 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3400 "_Fn must be a complete class or an unbounded array");
3401 static_assert((std::__is_complete_or_unbounded(
3402 __type_identity<_ArgTypes>{}) && ...),
3403 "each argument type must be a complete class or an unbounded array");
3404 static_assert(std::__is_complete_or_unbounded(__type_identity<_Ret>{}),
3405 "_Ret must be a complete class or an unbounded array");
3409 template<
typename _Fn,
typename... _ArgTypes>
3410 struct is_nothrow_invocable
3411#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_invocable)
3412 :
public __bool_constant<__is_nothrow_invocable(_Fn, _ArgTypes...)>
3414 : __and_<__is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>,
3415 __call_is_nothrow_<_Fn, _ArgTypes...>>::type
3418 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3419 "_Fn must be a complete class or an unbounded array");
3420 static_assert((std::__is_complete_or_unbounded(
3421 __type_identity<_ArgTypes>{}) && ...),
3422 "each argument type must be a complete class or an unbounded array");
3429 template<
typename _Result,
typename _Ret>
3430 using __is_nt_invocable_impl
3431 =
typename __is_invocable_impl<_Result, _Ret>::__nothrow_conv;
3435 template<
typename _Ret,
typename _Fn,
typename... _ArgTypes>
3436 struct is_nothrow_invocable_r
3437 : __and_<__is_nt_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>,
3438 __call_is_nothrow_<_Fn, _ArgTypes...>>::type
3440 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3441 "_Fn must be a complete class or an unbounded array");
3442 static_assert((std::__is_complete_or_unbounded(
3443 __type_identity<_ArgTypes>{}) && ...),
3444 "each argument type must be a complete class or an unbounded array");
3445 static_assert(std::__is_complete_or_unbounded(__type_identity<_Ret>{}),
3446 "_Ret must be a complete class or an unbounded array");
3450#if __cpp_lib_type_trait_variable_templates
3465template <
typename _Tp>
3467template <
typename _Tp>
3468 inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value;
3469template <
typename _Tp>
3471template <
typename _Tp>
3474#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_array)
3475template <
typename _Tp>
3476 inline constexpr bool is_array_v = __is_array(_Tp);
3478template <
typename _Tp>
3479 inline constexpr bool is_array_v =
false;
3480template <
typename _Tp>
3481 inline constexpr bool is_array_v<_Tp[]> =
true;
3482template <
typename _Tp,
size_t _Num>
3483 inline constexpr bool is_array_v<_Tp[_Num]> =
true;
3486#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_pointer)
3487template <
typename _Tp>
3488 inline constexpr bool is_pointer_v = __is_pointer(_Tp);
3490template <
typename _Tp>
3491 inline constexpr bool is_pointer_v =
false;
3492template <
typename _Tp>
3493 inline constexpr bool is_pointer_v<_Tp*> =
true;
3494template <
typename _Tp>
3495 inline constexpr bool is_pointer_v<_Tp* const> =
true;
3496template <
typename _Tp>
3497 inline constexpr bool is_pointer_v<_Tp* volatile> =
true;
3498template <
typename _Tp>
3499 inline constexpr bool is_pointer_v<_Tp* const volatile> =
true;
3502template <
typename _Tp>
3503 inline constexpr bool is_lvalue_reference_v =
false;
3504template <
typename _Tp>
3505 inline constexpr bool is_lvalue_reference_v<_Tp&> =
true;
3506template <
typename _Tp>
3507 inline constexpr bool is_rvalue_reference_v =
false;
3508template <
typename _Tp>
3509 inline constexpr bool is_rvalue_reference_v<_Tp&&> =
true;
3511#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_object_pointer)
3512template <
typename _Tp>
3513 inline constexpr bool is_member_object_pointer_v =
3514 __is_member_object_pointer(_Tp);
3516template <
typename _Tp>
3517 inline constexpr bool is_member_object_pointer_v =
3521#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_function_pointer)
3522template <
typename _Tp>
3523 inline constexpr bool is_member_function_pointer_v =
3524 __is_member_function_pointer(_Tp);
3526template <
typename _Tp>
3527 inline constexpr bool is_member_function_pointer_v =
3531template <
typename _Tp>
3532 inline constexpr bool is_enum_v = __is_enum(_Tp);
3533template <
typename _Tp>
3534 inline constexpr bool is_union_v = __is_union(_Tp);
3535template <
typename _Tp>
3536 inline constexpr bool is_class_v = __is_class(_Tp);
3539#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_reference)
3540template <
typename _Tp>
3541 inline constexpr bool is_reference_v = __is_reference(_Tp);
3543template <
typename _Tp>
3544 inline constexpr bool is_reference_v =
false;
3545template <
typename _Tp>
3546 inline constexpr bool is_reference_v<_Tp&> =
true;
3547template <
typename _Tp>
3548 inline constexpr bool is_reference_v<_Tp&&> =
true;
3551template <
typename _Tp>
3553template <
typename _Tp>
3556#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_object)
3557template <
typename _Tp>
3558 inline constexpr bool is_object_v = __is_object(_Tp);
3560template <
typename _Tp>
3564template <
typename _Tp>
3566template <
typename _Tp>
3567 inline constexpr bool is_compound_v = !is_fundamental_v<_Tp>;
3569#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_pointer)
3570template <
typename _Tp>
3571 inline constexpr bool is_member_pointer_v = __is_member_pointer(_Tp);
3573template <
typename _Tp>
3577#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_const)
3578template <
typename _Tp>
3579 inline constexpr bool is_const_v = __is_const(_Tp);
3581template <
typename _Tp>
3582 inline constexpr bool is_const_v =
false;
3583template <
typename _Tp>
3584 inline constexpr bool is_const_v<const _Tp> =
true;
3587#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_function)
3588template <
typename _Tp>
3589 inline constexpr bool is_function_v = __is_function(_Tp);
3591template <
typename _Tp>
3592 inline constexpr bool is_function_v = !is_const_v<const _Tp>;
3593template <
typename _Tp>
3594 inline constexpr bool is_function_v<_Tp&> =
false;
3595template <
typename _Tp>
3596 inline constexpr bool is_function_v<_Tp&&> =
false;
3599#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_volatile)
3600template <
typename _Tp>
3601 inline constexpr bool is_volatile_v = __is_volatile(_Tp);
3603template <
typename _Tp>
3604 inline constexpr bool is_volatile_v =
false;
3605template <
typename _Tp>
3606 inline constexpr bool is_volatile_v<volatile _Tp> =
true;
3609template <
typename _Tp>
3610 _GLIBCXX26_DEPRECATED_SUGGEST(
"is_trivially_default_constructible_v && is_trivially_copyable_v")
3611 inline constexpr
bool is_trivial_v = __is_trivial(_Tp);
3612template <typename _Tp>
3613 inline constexpr
bool is_trivially_copyable_v = __is_trivially_copyable(_Tp);
3614template <typename _Tp>
3615 inline constexpr
bool is_standard_layout_v = __is_standard_layout(_Tp);
3616template <typename _Tp>
3617 _GLIBCXX20_DEPRECATED_SUGGEST(
"is_standard_layout_v && is_trivial_v")
3618 inline constexpr
bool is_pod_v = __is_pod(_Tp);
3619template <typename _Tp>
3620 _GLIBCXX17_DEPRECATED
3621 inline constexpr
bool is_literal_type_v = __is_literal_type(_Tp);
3622template <typename _Tp>
3623 inline constexpr
bool is_empty_v = __is_empty(_Tp);
3624template <typename _Tp>
3625 inline constexpr
bool is_polymorphic_v = __is_polymorphic(_Tp);
3626template <typename _Tp>
3627 inline constexpr
bool is_abstract_v = __is_abstract(_Tp);
3628template <typename _Tp>
3629 inline constexpr
bool is_final_v = __is_final(_Tp);
3631template <typename _Tp>
3632 inline constexpr
bool is_signed_v =
is_signed<_Tp>::value;
3633template <typename _Tp>
3634 inline constexpr
bool is_unsigned_v =
is_unsigned<_Tp>::value;
3636template <typename _Tp, typename... _Args>
3637 inline constexpr
bool is_constructible_v = __is_constructible(_Tp, _Args...);
3638template <typename _Tp>
3639 inline constexpr
bool is_default_constructible_v = __is_constructible(_Tp);
3640template <typename _Tp>
3641 inline constexpr
bool is_copy_constructible_v
3642 = __is_constructible(_Tp, __add_lval_ref_t<const _Tp>);
3643template <typename _Tp>
3644 inline constexpr
bool is_move_constructible_v
3645 = __is_constructible(_Tp, __add_rval_ref_t<_Tp>);
3647template <typename _Tp, typename _Up>
3648 inline constexpr
bool is_assignable_v = __is_assignable(_Tp, _Up);
3649template <typename _Tp>
3650 inline constexpr
bool is_copy_assignable_v
3651 = __is_assignable(__add_lval_ref_t<_Tp>, __add_lval_ref_t<const _Tp>);
3652template <typename _Tp>
3653 inline constexpr
bool is_move_assignable_v
3654 = __is_assignable(__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>);
3656#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_destructible)
3657template <
typename _Tp>
3658 inline constexpr bool is_destructible_v = __is_destructible(_Tp);
3660template <
typename _Tp>
3664template <
typename _Tp,
typename... _Args>
3665 inline constexpr bool is_trivially_constructible_v
3666 = __is_trivially_constructible(_Tp, _Args...);
3667template <
typename _Tp>
3668 inline constexpr bool is_trivially_default_constructible_v
3669 = __is_trivially_constructible(_Tp);
3670template <
typename _Tp>
3671 inline constexpr bool is_trivially_copy_constructible_v
3672 = __is_trivially_constructible(_Tp, __add_lval_ref_t<const _Tp>);
3673template <
typename _Tp>
3674 inline constexpr bool is_trivially_move_constructible_v
3675 = __is_trivially_constructible(_Tp, __add_rval_ref_t<_Tp>);
3677template <
typename _Tp,
typename _Up>
3678 inline constexpr bool is_trivially_assignable_v
3679 = __is_trivially_assignable(_Tp, _Up);
3680template <
typename _Tp>
3681 inline constexpr bool is_trivially_copy_assignable_v
3682 = __is_trivially_assignable(__add_lval_ref_t<_Tp>,
3683 __add_lval_ref_t<const _Tp>);
3684template <
typename _Tp>
3685 inline constexpr bool is_trivially_move_assignable_v
3686 = __is_trivially_assignable(__add_lval_ref_t<_Tp>,
3687 __add_rval_ref_t<_Tp>);
3689#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_trivially_destructible)
3690template <
typename _Tp>
3691 inline constexpr bool is_trivially_destructible_v
3692 = __is_trivially_destructible(_Tp);
3694template <
typename _Tp>
3695 inline constexpr bool is_trivially_destructible_v =
false;
3697template <
typename _Tp>
3698 requires (!is_reference_v<_Tp>) &&
requires (_Tp& __t) { __t.~_Tp(); }
3699 inline constexpr bool is_trivially_destructible_v<_Tp>
3700 = __has_trivial_destructor(_Tp);
3701template <
typename _Tp>
3702 inline constexpr bool is_trivially_destructible_v<_Tp&> =
true;
3703template <
typename _Tp>
3704 inline constexpr bool is_trivially_destructible_v<_Tp&&> =
true;
3705template <
typename _Tp,
size_t _Nm>
3706 inline constexpr bool is_trivially_destructible_v<_Tp[_Nm]>
3707 = is_trivially_destructible_v<_Tp>;
3709template <
typename _Tp>
3710 inline constexpr bool is_trivially_destructible_v =
3714template <
typename _Tp,
typename... _Args>
3715 inline constexpr bool is_nothrow_constructible_v
3716 = __is_nothrow_constructible(_Tp, _Args...);
3717template <
typename _Tp>
3718 inline constexpr bool is_nothrow_default_constructible_v
3719 = __is_nothrow_constructible(_Tp);
3720template <
typename _Tp>
3721 inline constexpr bool is_nothrow_copy_constructible_v
3722 = __is_nothrow_constructible(_Tp, __add_lval_ref_t<const _Tp>);
3723template <
typename _Tp>
3724 inline constexpr bool is_nothrow_move_constructible_v
3725 = __is_nothrow_constructible(_Tp, __add_rval_ref_t<_Tp>);
3727template <
typename _Tp,
typename _Up>
3728 inline constexpr bool is_nothrow_assignable_v
3729 = __is_nothrow_assignable(_Tp, _Up);
3730template <
typename _Tp>
3731 inline constexpr bool is_nothrow_copy_assignable_v
3732 = __is_nothrow_assignable(__add_lval_ref_t<_Tp>,
3733 __add_lval_ref_t<const _Tp>);
3734template <
typename _Tp>
3735 inline constexpr bool is_nothrow_move_assignable_v
3736 = __is_nothrow_assignable(__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>);
3738#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_destructible)
3739template <
typename _Tp>
3740 inline constexpr bool is_nothrow_destructible_v
3741 = __is_nothrow_destructible(_Tp);
3743template <
typename _Tp>
3744 inline constexpr bool is_nothrow_destructible_v =
3748template <
typename _Tp>
3749 inline constexpr bool has_virtual_destructor_v
3750 = __has_virtual_destructor(_Tp);
3752template <
typename _Tp>
3753 inline constexpr size_t alignment_of_v = alignment_of<_Tp>::value;
3755#if _GLIBCXX_USE_BUILTIN_TRAIT(__array_rank) \
3756 && (!defined(__clang__) || __clang_major__ >= 20)
3757template <
typename _Tp>
3758 inline constexpr size_t rank_v = __array_rank(_Tp);
3760template <
typename _Tp>
3761 inline constexpr size_t rank_v = 0;
3762template <
typename _Tp,
size_t _Size>
3763 inline constexpr size_t rank_v<_Tp[_Size]> = 1 + rank_v<_Tp>;
3764template <
typename _Tp>
3765 inline constexpr size_t rank_v<_Tp[]> = 1 + rank_v<_Tp>;
3768template <
typename _Tp,
unsigned _Idx = 0>
3769 inline constexpr size_t extent_v = 0;
3770template <
typename _Tp,
size_t _Size>
3771 inline constexpr size_t extent_v<_Tp[_Size], 0> = _Size;
3772template <
typename _Tp,
unsigned _Idx,
size_t _Size>
3773 inline constexpr size_t extent_v<_Tp[_Size], _Idx> = extent_v<_Tp, _Idx - 1>;
3774template <
typename _Tp>
3775 inline constexpr size_t extent_v<_Tp[], 0> = 0;
3776template <
typename _Tp,
unsigned _Idx>
3777 inline constexpr size_t extent_v<_Tp[], _Idx> = extent_v<_Tp, _Idx - 1>;
3779#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_same)
3780template <
typename _Tp,
typename _Up>
3781 inline constexpr bool is_same_v = __is_same(_Tp, _Up);
3783template <
typename _Tp,
typename _Up>
3784 inline constexpr bool is_same_v =
false;
3785template <
typename _Tp>
3786 inline constexpr bool is_same_v<_Tp, _Tp> =
true;
3788template <
typename _Base,
typename _Derived>
3789 inline constexpr bool is_base_of_v = __is_base_of(_Base, _Derived);
3790#ifdef __cpp_lib_is_virtual_base_of
3791template <
typename _Base,
typename _Derived>
3792 inline constexpr bool is_virtual_base_of_v = __builtin_is_virtual_base_of(_Base, _Derived);
3794#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_convertible)
3795template <
typename _From,
typename _To>
3796 inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
3798template <
typename _From,
typename _To>
3799 inline constexpr bool is_convertible_v = is_convertible<_From, _To>::value;
3801template<
typename _Fn,
typename... _Args>
3802 inline constexpr bool is_invocable_v
3803#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_invocable)
3804 = __is_invocable(_Fn, _Args...);
3806 = is_invocable<_Fn, _Args...>::value;
3808template<
typename _Fn,
typename... _Args>
3809 inline constexpr bool is_nothrow_invocable_v
3810#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_invocable)
3811 = __is_nothrow_invocable(_Fn, _Args...);
3813 = is_nothrow_invocable<_Fn, _Args...>::value;
3815template<
typename _Ret,
typename _Fn,
typename... _Args>
3816 inline constexpr bool is_invocable_r_v
3817 = is_invocable_r<_Ret, _Fn, _Args...>::value;
3818template<
typename _Ret,
typename _Fn,
typename... _Args>
3819 inline constexpr bool is_nothrow_invocable_r_v
3820 = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value;
3824#ifdef __cpp_lib_has_unique_object_representations
3827 template<typename _Tp>
3828 struct has_unique_object_representations
3829 : bool_constant<__has_unique_object_representations(
3830 remove_cv_t<remove_all_extents_t<_Tp>>
3833 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3834 "template argument must be a complete class or an unbounded array");
3837# if __cpp_lib_type_trait_variable_templates
3839 template<typename _Tp>
3840 inline constexpr bool has_unique_object_representations_v
3841 = has_unique_object_representations<_Tp>::value;
3845#ifdef __cpp_lib_is_aggregate
3848 template<typename _Tp>
3850 : bool_constant<__is_aggregate(remove_cv_t<_Tp>)>
3853# if __cpp_lib_type_trait_variable_templates
3858 template<
typename _Tp>
3859 inline constexpr bool is_aggregate_v = __is_aggregate(remove_cv_t<_Tp>);
3867#ifdef __cpp_lib_remove_cvref
3868# if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_cvref)
3869 template<
typename _Tp>
3871 {
using type = __remove_cvref(_Tp); };
3873 template<
typename _Tp>
3875 {
using type =
typename remove_cv<_Tp>::type; };
3877 template<
typename _Tp>
3878 struct remove_cvref<_Tp&>
3879 {
using type =
typename remove_cv<_Tp>::type; };
3881 template<
typename _Tp>
3882 struct remove_cvref<_Tp&&>
3883 {
using type =
typename remove_cv<_Tp>::type; };
3886 template<
typename _Tp>
3887 using remove_cvref_t =
typename remove_cvref<_Tp>::type;
3891#ifdef __cpp_lib_type_identity
3896 template<
typename _Tp>
3897 struct type_identity {
using type = _Tp; };
3899 template<
typename _Tp>
3900 using type_identity_t =
typename type_identity<_Tp>::type;
3904#ifdef __cpp_lib_unwrap_ref
3909 template<
typename _Tp>
3910 struct unwrap_reference {
using type = _Tp; };
3912 template<
typename _Tp>
3915 template<
typename _Tp>
3916 using unwrap_reference_t =
typename unwrap_reference<_Tp>::type;
3923 template<
typename _Tp>
3924 struct unwrap_ref_decay {
using type = unwrap_reference_t<decay_t<_Tp>>; };
3926 template<
typename _Tp>
3927 using unwrap_ref_decay_t =
typename unwrap_ref_decay<_Tp>::type;
3931#ifdef __cpp_lib_bounded_array_traits
3935# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_bounded_array)
3936 template<
typename _Tp>
3937 inline constexpr bool is_bounded_array_v = __is_bounded_array(_Tp);
3939 template<
typename _Tp>
3940 inline constexpr bool is_bounded_array_v =
false;
3942 template<
typename _Tp,
size_t _Size>
3943 inline constexpr bool is_bounded_array_v<_Tp[_Size]> =
true;
3949# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_unbounded_array)
3950 template<
typename _Tp>
3951 inline constexpr bool is_unbounded_array_v = __is_unbounded_array(_Tp);
3953 template<
typename _Tp>
3954 inline constexpr bool is_unbounded_array_v =
false;
3956 template<
typename _Tp>
3957 inline constexpr bool is_unbounded_array_v<_Tp[]> =
true;
3962 template<
typename _Tp>
3963 struct is_bounded_array
3964 :
public bool_constant<is_bounded_array_v<_Tp>>
3969 template<
typename _Tp>
3970 struct is_unbounded_array
3971 :
public bool_constant<is_unbounded_array_v<_Tp>>
3975#if __has_builtin(__is_layout_compatible) && __cplusplus >= 202002L
3978 template<
typename _Tp,
typename _Up>
3980 : bool_constant<__is_layout_compatible(_Tp, _Up)>
3985 template<
typename _Tp,
typename _Up>
3987 = __is_layout_compatible(_Tp, _Up);
3989#if __has_builtin(__builtin_is_corresponding_member)
3990# ifndef __cpp_lib_is_layout_compatible
3991# error "libstdc++ bug: is_corresponding_member and is_layout_compatible are provided but their FTM is not set"
3995 template<
typename _S1,
typename _S2,
typename _M1,
typename _M2>
3998 {
return __builtin_is_corresponding_member(__m1, __m2); }
4002#if __has_builtin(__is_pointer_interconvertible_base_of) \
4003 && __cplusplus >= 202002L
4006 template<
typename _Base,
typename _Derived>
4008 : bool_constant<__is_pointer_interconvertible_base_of(_Base, _Derived)>
4013 template<
typename _Base,
typename _Derived>
4015 = __is_pointer_interconvertible_base_of(_Base, _Derived);
4017#if __has_builtin(__builtin_is_pointer_interconvertible_with_class)
4018# ifndef __cpp_lib_is_pointer_interconvertible
4019# error "libstdc++ bug: is_pointer_interconvertible available but FTM is not set"
4025 template<
typename _Tp,
typename _Mem>
4028 {
return __builtin_is_pointer_interconvertible_with_class(__mp); }
4032#ifdef __cpp_lib_is_scoped_enum
4036# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_scoped_enum)
4037 template<
typename _Tp>
4038 struct is_scoped_enum
4039 : bool_constant<__is_scoped_enum(_Tp)>
4042 template<
typename _Tp>
4043 struct is_scoped_enum
4047 template<
typename _Tp>
4048 requires __is_enum(_Tp)
4049 &&
requires(remove_cv_t<_Tp> __t) { __t = __t; }
4050 struct is_scoped_enum<_Tp>
4051 : bool_constant<!requires(_Tp __t, void(*__f)(int)) { __f(__t); }>
4057# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_scoped_enum)
4058 template<
typename _Tp>
4059 inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp);
4061 template<
typename _Tp>
4062 inline constexpr bool is_scoped_enum_v = is_scoped_enum<_Tp>::value;
4066#ifdef __cpp_lib_is_implicit_lifetime
4070 template<
typename _Tp>
4071 struct is_implicit_lifetime
4072 : bool_constant<__builtin_is_implicit_lifetime(_Tp)>
4077 template<
typename _Tp>
4078 inline constexpr bool is_implicit_lifetime_v
4079 = __builtin_is_implicit_lifetime(_Tp);
4082#ifdef __cpp_lib_reference_from_temporary
4087 template<typename _Tp, typename _Up>
4088 struct reference_constructs_from_temporary
4089 :
public bool_constant<__reference_constructs_from_temporary(_Tp, _Up)>
4091 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{})
4092 && std::__is_complete_or_unbounded(__type_identity<_Up>{}),
4093 "template argument must be a complete class or an unbounded array");
4100 template<
typename _Tp,
typename _Up>
4101 struct reference_converts_from_temporary
4102 :
public bool_constant<__reference_converts_from_temporary(_Tp, _Up)>
4104 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{})
4105 && std::__is_complete_or_unbounded(__type_identity<_Up>{}),
4106 "template argument must be a complete class or an unbounded array");
4111 template<
typename _Tp,
typename _Up>
4112 inline constexpr bool reference_constructs_from_temporary_v
4113 = reference_constructs_from_temporary<_Tp, _Up>::value;
4117 template<
typename _Tp,
typename _Up>
4118 inline constexpr bool reference_converts_from_temporary_v
4119 = reference_converts_from_temporary<_Tp, _Up>::value;
4122#ifdef __cpp_lib_is_constant_evaluated
4125 [[__gnu__::__always_inline__]]
4127 is_constant_evaluated() noexcept
4129#if __cpp_if_consteval >= 202106L
4130 if consteval {
return true; }
else {
return false; }
4132 return __builtin_is_constant_evaluated();
4137#if __cplusplus >= 202002L
4139 template<
typename _From,
typename _To>
4140 using __copy_cv =
typename __match_cv_qualifiers<_From, _To>::__type;
4142 template<
typename _Xp,
typename _Yp>
4146 template<
typename _Ap,
typename _Bp,
typename =
void>
4147 struct __common_ref_impl
4151 template<
typename _Ap,
typename _Bp>
4152 using __common_ref =
typename __common_ref_impl<_Ap, _Bp>::type;
4155 template<
typename _Xp,
typename _Yp>
4156 using __condres_cvref
4157 = __cond_res<__copy_cv<_Xp, _Yp>&, __copy_cv<_Yp, _Xp>&>;
4160 template<
typename _Xp,
typename _Yp>
4161 struct __common_ref_impl<_Xp&, _Yp&, __void_t<__condres_cvref<_Xp, _Yp>>>
4163 __condres_cvref<_Xp, _Yp>>
4167 template<
typename _Xp,
typename _Yp>
4171 template<
typename _Xp,
typename _Yp>
4172 struct __common_ref_impl<_Xp&&, _Yp&&,
4173 _Require<is_convertible<_Xp&&, __common_ref_C<_Xp, _Yp>>,
4174 is_convertible<_Yp&&, __common_ref_C<_Xp, _Yp>>>>
4175 {
using type = __common_ref_C<_Xp, _Yp>; };
4178 template<
typename _Xp,
typename _Yp>
4179 using __common_ref_D = __common_ref<const _Xp&, _Yp&>;
4182 template<
typename _Xp,
typename _Yp>
4183 struct __common_ref_impl<_Xp&&, _Yp&,
4184 _Require<is_convertible<_Xp&&, __common_ref_D<_Xp, _Yp>>>>
4185 {
using type = __common_ref_D<_Xp, _Yp>; };
4188 template<
typename _Xp,
typename _Yp>
4189 struct __common_ref_impl<_Xp&, _Yp&&>
4190 : __common_ref_impl<_Yp&&, _Xp&>
4194 template<
typename _Tp,
typename _Up,
4195 template<
typename>
class _TQual,
template<
typename>
class _UQual>
4196 struct basic_common_reference
4200 template<
typename _Tp>
4202 {
template<
typename _Up>
using __type = __copy_cv<_Tp, _Up>; };
4204 template<
typename _Tp>
4206 {
template<
typename _Up>
using __type = __copy_cv<_Tp, _Up>&; };
4208 template<
typename _Tp>
4209 struct __xref<_Tp&&>
4210 {
template<
typename _Up>
using __type = __copy_cv<_Tp, _Up>&&; };
4212 template<
typename _Tp1,
typename _Tp2>
4213 using __basic_common_ref
4214 =
typename basic_common_reference<remove_cvref_t<_Tp1>,
4215 remove_cvref_t<_Tp2>,
4216 __xref<_Tp1>::template __type,
4217 __xref<_Tp2>::template __type>::type;
4220 template<
typename... _Tp>
4221 struct common_reference;
4223 template<
typename... _Tp>
4228 struct common_reference<>
4232 template<
typename _Tp0>
4233 struct common_reference<_Tp0>
4234 {
using type = _Tp0; };
4237 template<
typename _Tp1,
typename _Tp2,
int _Bullet = 1>
4238 struct __common_reference_impl
4239 : __common_reference_impl<_Tp1, _Tp2, _Bullet + 1>
4243 template<
typename _Tp1,
typename _Tp2>
4244 struct common_reference<_Tp1, _Tp2>
4245 : __common_reference_impl<_Tp1, _Tp2>
4249 template<
typename _Tp1,
typename _Tp2>
4250 requires is_reference_v<_Tp1> && is_reference_v<_Tp2>
4251 &&
requires {
typename __common_ref<_Tp1, _Tp2>; }
4252#if __cpp_lib_common_reference
4253 && is_convertible_v<add_pointer_t<_Tp1>,
4255 && is_convertible_v<add_pointer_t<_Tp2>,
4258 struct __common_reference_impl<_Tp1, _Tp2, 1>
4259 {
using type = __common_ref<_Tp1, _Tp2>; };
4262 template<
typename _Tp1,
typename _Tp2>
4263 requires requires {
typename __basic_common_ref<_Tp1, _Tp2>; }
4264 struct __common_reference_impl<_Tp1, _Tp2, 2>
4265 {
using type = __basic_common_ref<_Tp1, _Tp2>; };
4268 template<
typename _Tp1,
typename _Tp2>
4269 requires requires {
typename __cond_res<_Tp1, _Tp2>; }
4270 struct __common_reference_impl<_Tp1, _Tp2, 3>
4271 {
using type = __cond_res<_Tp1, _Tp2>; };
4274 template<
typename _Tp1,
typename _Tp2>
4276 struct __common_reference_impl<_Tp1, _Tp2, 4>
4277 {
using type = common_type_t<_Tp1, _Tp2>; };
4280 template<
typename _Tp1,
typename _Tp2>
4281 struct __common_reference_impl<_Tp1, _Tp2, 5>
4285 template<
typename _Tp1,
typename _Tp2,
typename... _Rest>
4286 struct common_reference<_Tp1, _Tp2, _Rest...>
4287 : __common_type_fold<common_reference<_Tp1, _Tp2>,
4288 __common_type_pack<_Rest...>>
4292 template<
typename _Tp1,
typename _Tp2,
typename... _Rest>
4293 struct __common_type_fold<common_reference<_Tp1, _Tp2>,
4294 __common_type_pack<_Rest...>,
4296 :
public common_reference<common_reference_t<_Tp1, _Tp2>, _Rest...>
4302#if __cplusplus >= 201103L
4305 template<
size_t... _Indexes>
struct _Index_tuple { };
4308 template<
size_t _Num>
4309 struct _Build_index_tuple
4311#if __has_builtin(__make_integer_seq)
4312 template<
typename,
size_t... _Indices>
4313 using _IdxTuple = _Index_tuple<_Indices...>;
4316 using __type = __make_integer_seq<_IdxTuple, size_t, _Num>;
4319 using __type = _Index_tuple<__integer_pack(_Num)...>;
4324#ifdef __cpp_lib_constant_wrapper
4325 template<
typename _Tp>
4326 struct _CwFixedValue
4331 _CwFixedValue(__type __v) noexcept
4337 template<
typename _Tp,
size_t _Extent>
4338 struct _CwFixedValue<_Tp[_Extent]>
4340 using __type = _Tp[_Extent];
4343 _CwFixedValue(_Tp (&__arr)[_Extent]) noexcept
4344 : _CwFixedValue(__arr,
typename _Build_index_tuple<_Extent>::__type())
4347 template<
size_t... _Indices>
4349 _CwFixedValue(_Tp (&__arr)[_Extent], _Index_tuple<_Indices...>) noexcept
4350 : _M_data{__arr[_Indices]...}
4353 _Tp _M_data[_Extent];
4356 template<
typename _Tp,
size_t _Extent>
4357 _CwFixedValue(_Tp (&)[_Extent]) -> _CwFixedValue<_Tp[_Extent]>;
4359 template<_CwFixedValue _Xv,
4360 typename =
typename decltype(_CwFixedValue(_Xv))::__type>
4361 struct constant_wrapper;
4363 template<
typename _Tp>
4364 concept _ConstExprParam =
requires
4366 typename constant_wrapper<_Tp::value>;
4371 template<_ConstExprParam _Tp>
4372 friend constexpr auto
4373 operator+(_Tp)
noexcept -> constant_wrapper<(+_Tp::value)>
4376 template<_ConstExprParam _Tp>
4377 friend constexpr auto
4378 operator-(_Tp)
noexcept -> constant_wrapper<(-_Tp::value)>
4381 template<_ConstExprParam _Tp>
4382 friend constexpr auto
4383 operator~(_Tp)
noexcept -> constant_wrapper<(~_Tp::value)>
4386 template<_ConstExprParam _Tp>
4387 friend constexpr auto
4388 operator!(_Tp)
noexcept -> constant_wrapper<(!_Tp::value)>
4391 template<_ConstExprParam _Tp>
4392 friend constexpr auto
4393 operator&(_Tp)
noexcept -> constant_wrapper<(&_Tp::value)>
4396 template<_ConstExprParam _Tp>
4397 friend constexpr auto
4398 operator*(_Tp)
noexcept -> constant_wrapper<(*_Tp::value)>
4401 template<_ConstExprParam _Left, _ConstExprParam _Right>
4402 friend constexpr auto
4404 -> constant_wrapper<(_Left::value + _Right::value)>
4407 template<_ConstExprParam _Left, _ConstExprParam _Right>
4408 friend constexpr auto
4410 -> constant_wrapper<(_Left::value - _Right::value)>
4413 template<_ConstExprParam _Left, _ConstExprParam _Right>
4414 friend constexpr auto
4416 -> constant_wrapper<(_Left::value * _Right::value)>
4419 template<_ConstExprParam _Left, _ConstExprParam _Right>
4420 friend constexpr auto
4422 -> constant_wrapper<(_Left::value / _Right::value)>
4425 template<_ConstExprParam _Left, _ConstExprParam _Right>
4426 friend constexpr auto
4427 operator%(_Left, _Right)
noexcept
4428 -> constant_wrapper<(_Left::value % _Right::value)>
4431 template<_ConstExprParam _Left, _ConstExprParam _Right>
4432 friend constexpr auto
4434 -> constant_wrapper<(_Left::value << _Right::value)>
4437 template<_ConstExprParam _Left, _ConstExprParam _Right>
4438 friend constexpr auto
4440 -> constant_wrapper<(_Left::value >> _Right::value)>
4443 template<_ConstExprParam _Left, _ConstExprParam _Right>
4444 friend constexpr auto
4446 -> constant_wrapper<(_Left::value & _Right::value)>
4449 template<_ConstExprParam _Left, _ConstExprParam _Right>
4450 friend constexpr auto
4452 -> constant_wrapper<(_Left::value | _Right::value)>
4455 template<_ConstExprParam _Left, _ConstExprParam _Right>
4456 friend constexpr auto
4458 -> constant_wrapper<(_Left::value ^ _Right::value)>
4461 template<_ConstExprParam _Left, _ConstExprParam _Right>
4462 requires (!is_constructible_v<bool,
decltype(_Left::value)>
4463 || !is_constructible_v<bool,
decltype(_Right::value)>)
4464 friend constexpr auto
4465 operator&&(_Left, _Right)
noexcept
4466 -> constant_wrapper<(_Left::value && _Right::value)>
4469 template<_ConstExprParam _Left, _ConstExprParam _Right>
4470 requires (!is_constructible_v<bool,
decltype(_Left::value)>
4471 || !is_constructible_v<bool,
decltype(_Right::value)>)
4472 friend constexpr auto
4473 operator||(_Left, _Right)
noexcept
4474 -> constant_wrapper<(_Left::value || _Right::value)>
4477 template<_ConstExprParam _Left, _ConstExprParam _Right>
4478 friend constexpr auto
4479 operator<=>(_Left, _Right)
noexcept
4480 -> constant_wrapper<(_Left::value <=> _Right::value)>
4483 template<_ConstExprParam _Left, _ConstExprParam _Right>
4484 friend constexpr auto
4485 operator<(_Left, _Right)
noexcept
4486 -> constant_wrapper<(_Left::value < _Right::value)>
4489 template<_ConstExprParam _Left, _ConstExprParam _Right>
4490 friend constexpr auto
4491 operator<=(_Left, _Right)
noexcept
4492 -> constant_wrapper<(_Left::value <= _Right::value)>
4495 template<_ConstExprParam _Left, _ConstExprParam _Right>
4496 friend constexpr auto
4497 operator==(_Left, _Right)
noexcept
4498 -> constant_wrapper<(_Left::value == _Right::value)>
4501 template<_ConstExprParam _Left, _ConstExprParam _Right>
4502 friend constexpr auto
4503 operator!=(_Left, _Right)
noexcept
4504 -> constant_wrapper<(_Left::value != _Right::value)>
4507 template<_ConstExprParam _Left, _ConstExprParam _Right>
4508 friend constexpr auto
4509 operator>(_Left, _Right)
noexcept
4510 -> constant_wrapper<(_Left::value > _Right::value)>
4513 template<_ConstExprParam _Left, _ConstExprParam _Right>
4514 friend constexpr auto
4515 operator>=(_Left, _Right)
noexcept
4516 -> constant_wrapper<(_Left::value >= _Right::value)>
4519 template<_ConstExprParam _Left, _ConstExprParam _Right>
4520 friend constexpr auto
4521 operator,(_Left, _Right)
noexcept =
delete;
4523 template<_ConstExprParam _Left, _ConstExprParam _Right>
4524 friend constexpr auto
4525 operator->*(_Left, _Right)
noexcept
4526 -> constant_wrapper<_Left::value->*(_Right::value)>
4529 template<_ConstExprParam _Tp, _ConstExprParam... _Args>
4531 operator()(
this _Tp, _Args...) noexcept
4533 requires(_Args...) { constant_wrapper<_Tp::value(_Args::value...)>(); }
4534 {
return constant_wrapper<_Tp::value(_Args::value...)>{}; }
4536 template<_ConstExprParam _Tp, _ConstExprParam... _Args>
4538 operator[](
this _Tp, _Args...) noexcept
4539 -> constant_wrapper<(_Tp::value[_Args::value...])>
4542 template<_ConstExprParam _Tp>
4544 operator++(
this _Tp)
noexcept
4545 requires requires(_Tp::value_type __x) { ++__x; }
4547 return constant_wrapper<
4548 [] {
auto __x = _Tp::value;
return ++__x; }()>{};
4551 template<_ConstExprParam _Tp>
4553 operator++(
this _Tp,
int)
noexcept
4554 requires requires(_Tp::value_type __x) { __x++; }
4556 return constant_wrapper<
4557 [] {
auto __x = _Tp::value;
return __x++; }()>{};
4560 template<_ConstExprParam _Tp>
4562 operator--(
this _Tp)
noexcept
4563 requires requires(_Tp::value_type __x) { --__x; }
4565 return constant_wrapper<
4566 [] {
auto __x = _Tp::value;
return --__x; }()>{};
4569 template<_ConstExprParam _Tp>
4571 operator--(
this _Tp,
int)
noexcept
4572 requires requires(_Tp::value_type __x) { __x--; }
4574 return constant_wrapper<
4575 [] {
auto __x = _Tp::value;
return __x--; }()>{};
4578 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4580 operator+=(
this _Tp, _Right)
noexcept
4581 requires requires(_Tp::value_type __x) { __x += _Right::value; }
4583 return constant_wrapper<
4584 [] {
auto __x = _Tp::value;
return __x += _Right::value; }()>{};
4587 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4589 operator-=(
this _Tp, _Right)
noexcept
4590 requires requires(_Tp::value_type __x) { __x -= _Right::value; }
4592 return constant_wrapper<
4593 [] {
auto __x = _Tp::value;
return __x -= _Right::value; }()>{};
4596 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4598 operator*=(
this _Tp, _Right)
noexcept
4599 requires requires(_Tp::value_type __x) { __x *= _Right::value; }
4601 return constant_wrapper<
4602 [] {
auto __x = _Tp::value;
return __x *= _Right::value; }()>{};
4605 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4607 operator/=(
this _Tp, _Right)
noexcept
4608 requires requires(_Tp::value_type __x) { __x /= _Right::value; }
4610 return constant_wrapper<
4611 [] {
auto __x = _Tp::value;
return __x /= _Right::value; }()>{};
4614 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4616 operator%=(
this _Tp, _Right)
noexcept
4617 requires requires(_Tp::value_type __x) { __x %= _Right::value; }
4619 return constant_wrapper<
4620 [] {
auto __x = _Tp::value;
return __x %= _Right::value; }()>{};
4623 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4625 operator&=(
this _Tp, _Right)
noexcept
4626 requires requires(_Tp::value_type __x) { __x &= _Right::value; }
4628 return constant_wrapper<
4629 [] {
auto __x = _Tp::value;
return __x &= _Right::value; }()>{};
4632 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4634 operator|=(
this _Tp, _Right)
noexcept
4635 requires requires(_Tp::value_type __x) { __x |= _Right::value; }
4637 return constant_wrapper<
4638 [] {
auto __x = _Tp::value;
return __x |= _Right::value; }()>{};
4641 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4643 operator^=(
this _Tp, _Right)
noexcept
4644 requires requires(_Tp::value_type __x) { __x ^= _Right::value; }
4646 return constant_wrapper<
4647 [] {
auto __x = _Tp::value;
return __x ^= _Right::value; }()>{};
4650 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4652 operator<<=(
this _Tp, _Right)
noexcept
4653 requires requires(_Tp::value_type __x) { __x <<= _Right::value; }
4655 return constant_wrapper<
4656 [] {
auto __x = _Tp::value;
return __x <<= _Right::value; }()>{};
4659 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4661 operator>>=(
this _Tp, _Right)
noexcept
4662 requires requires(_Tp::value_type __x) { __x >>= _Right::value; }
4664 return constant_wrapper<
4665 [] {
auto __x = _Tp::value;
return __x >>= _Right::value; }()>{};
4669 template<_CwFixedValue _Xv,
typename>
4670 struct constant_wrapper : _CwOperators
4672 static constexpr const auto& value = _Xv._M_data;
4673 using type = constant_wrapper;
4674 using value_type =
typename decltype(_Xv)::__type;
4676 template<_ConstExprParam _Right>
4678 operator=(_Right)
const noexcept
4679 requires requires(value_type __x) { __x = _Right::value; }
4681 return constant_wrapper<
4682 [] {
auto __x = value;
return __x = _Right::value; }()>{};
4686 operator decltype(value)()
const noexcept
4690 template<_CwFixedValue _Tp>
4691 constexpr auto cw = constant_wrapper<_Tp>{};
4696_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