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_constant_wrapper
45#define __glibcxx_want_has_unique_object_representations
46#define __glibcxx_want_integral_constant_callable
47#define __glibcxx_want_is_aggregate
48#define __glibcxx_want_is_constant_evaluated
49#define __glibcxx_want_is_final
50#define __glibcxx_want_is_implicit_lifetime
51#define __glibcxx_want_is_invocable
52#define __glibcxx_want_is_layout_compatible
53#define __glibcxx_want_is_nothrow_convertible
54#define __glibcxx_want_is_null_pointer
55#define __glibcxx_want_is_pointer_interconvertible
56#define __glibcxx_want_is_scoped_enum
57#define __glibcxx_want_is_swappable
58#define __glibcxx_want_is_virtual_base_of
59#define __glibcxx_want_logical_traits
60#define __glibcxx_want_reference_from_temporary
61#define __glibcxx_want_remove_cvref
62#define __glibcxx_want_result_of_sfinae
63#define __glibcxx_want_transformation_trait_aliases
64#define __glibcxx_want_type_identity
65#define __glibcxx_want_type_trait_variable_templates
66#define __glibcxx_want_unwrap_ref
67#define __glibcxx_want_void_t
72namespace std _GLIBCXX_VISIBILITY(default)
74_GLIBCXX_BEGIN_NAMESPACE_VERSION
76 template<
typename _Tp>
93 template<
typename _Tp, _Tp __v>
96 static constexpr _Tp value = __v;
97 using value_type = _Tp;
99 constexpr operator value_type()
const noexcept {
return value; }
101#ifdef __cpp_lib_integral_constant_callable
102 constexpr value_type operator()()
const noexcept {
return value; }
106#if ! __cpp_inline_variables
107 template<
typename _Tp, _Tp __v>
108 constexpr _Tp integral_constant<_Tp, __v>::value;
123#ifdef __cpp_lib_bool_constant
127 using bool_constant = __bool_constant<__v>;
134 template<
bool,
typename _Tp =
void>
139 template<
typename _Tp>
141 {
using type = _Tp; };
144 template<
bool _Cond,
typename _Tp =
void>
145 using __enable_if_t =
typename enable_if<_Cond, _Tp>::type;
150 template<
typename _Tp,
typename>
155 struct __conditional<false>
157 template<
typename,
typename _Up>
162 template<
bool _Cond,
typename _If,
typename _Else>
163 using __conditional_t
167 template <
typename _Type>
168 struct __type_identity
169 {
using type = _Type; };
171 template<
typename _Tp>
172 using __type_identity_t =
typename __type_identity<_Tp>::type;
177 template<
typename _Tp,
typename...>
178 using __first_t = _Tp;
181 template<
typename... _Bn>
183 __enable_if_t<!bool(_Bn::value)>...>;
185 template<
typename... _Bn>
188 template<
typename... _Bn>
189 auto __and_fn(
int) -> __first_t<
true_type,
190 __enable_if_t<bool(_Bn::value)>...>;
192 template<
typename... _Bn>
199 template<
typename... _Bn>
201 : decltype(__detail::__or_fn<_Bn...>(0))
204 template<
typename... _Bn>
206 : decltype(__detail::__and_fn<_Bn...>(0))
209 template<
typename _Pp>
211 : __bool_constant<!bool(_Pp::value)>
215#ifdef __cpp_lib_logical_traits
218 template<
typename... _Bn>
219 inline constexpr bool __or_v = __or_<_Bn...>::value;
220 template<
typename... _Bn>
221 inline constexpr bool __and_v = __and_<_Bn...>::value;
225 template<
typename ,
typename _B1,
typename... _Bn>
226 struct __disjunction_impl
227 {
using type = _B1; };
229 template<
typename _B1,
typename _B2,
typename... _Bn>
230 struct __disjunction_impl<__enable_if_t<!bool(_B1::value)>, _B1, _B2, _Bn...>
231 {
using type =
typename __disjunction_impl<void, _B2, _Bn...>::type; };
233 template<
typename ,
typename _B1,
typename... _Bn>
234 struct __conjunction_impl
235 {
using type = _B1; };
237 template<
typename _B1,
typename _B2,
typename... _Bn>
238 struct __conjunction_impl<__enable_if_t<bool(_B1::value)>, _B1, _B2, _Bn...>
239 {
using type =
typename __conjunction_impl<void, _B2, _Bn...>::type; };
243 template<
typename... _Bn>
245 : __detail::__conjunction_impl<void, _Bn...>::type
253 template<
typename... _Bn>
255 : __detail::__disjunction_impl<void, _Bn...>::type
263 template<
typename _Pp>
271 template<
typename... _Bn>
272 inline constexpr bool conjunction_v = conjunction<_Bn...>::value;
274 template<
typename... _Bn>
275 inline constexpr bool disjunction_v = disjunction<_Bn...>::value;
277 template<
typename _Pp>
278 inline constexpr bool negation_v = negation<_Pp>::value;
293 struct __is_array_unknown_bounds;
298 template<
typename _Tp>
299 using __maybe_complete_object_type
300 = __and_<is_object<_Tp>, __not_<__is_array_unknown_bounds<_Tp>>>;
306 template<
typename _Tp,
307 typename = __enable_if_t<__maybe_complete_object_type<_Tp>::value>,
308 size_t =
sizeof(_Tp)>
310 __is_complete_or_unbounded(__type_identity<_Tp>)
315 template<
typename _TypeIdentity,
316 typename _NestedType =
typename _TypeIdentity::type>
317 constexpr typename __not_<__maybe_complete_object_type<_NestedType>>::type
318 __is_complete_or_unbounded(_TypeIdentity)
322 template<
typename _Tp>
323 using __remove_cv_t =
typename remove_cv<_Tp>::type;
329 template<
typename _Tp>
338 struct is_void<const void>
339 :
public true_type { };
346 struct is_void<const volatile void>
351 struct __is_integral_helper
355 struct __is_integral_helper<bool>
359 struct __is_integral_helper<char>
363 struct __is_integral_helper<signed char>
367 struct __is_integral_helper<unsigned char>
374 struct __is_integral_helper<wchar_t>
377#ifdef _GLIBCXX_USE_CHAR8_T
379 struct __is_integral_helper<char8_t>
384 struct __is_integral_helper<char16_t>
388 struct __is_integral_helper<char32_t>
392 struct __is_integral_helper<short>
396 struct __is_integral_helper<unsigned short>
400 struct __is_integral_helper<int>
404 struct __is_integral_helper<unsigned int>
408 struct __is_integral_helper<long>
412 struct __is_integral_helper<unsigned long>
416 struct __is_integral_helper<long long>
420 struct __is_integral_helper<unsigned long long>
425#if defined(__GLIBCXX_TYPE_INT_N_0)
428 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_0>
433 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_0>
436#if defined(__GLIBCXX_TYPE_INT_N_1)
439 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_1>
444 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_1>
447#if defined(__GLIBCXX_TYPE_INT_N_2)
450 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_2>
455 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_2>
458#if defined(__GLIBCXX_TYPE_INT_N_3)
461 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_3>
466 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_3>
470#if defined __SIZEOF_INT128__ && defined __STRICT_ANSI__
473 struct __is_integral_helper<__int128>
478 struct __is_integral_helper<unsigned __int128>
485 template<
typename _Tp>
487 :
public __is_integral_helper<__remove_cv_t<_Tp>>
::type
492 struct __is_floating_point_helper
496 struct __is_floating_point_helper<float>
497 :
public true_type { };
500 struct __is_floating_point_helper<double>
504 struct __is_floating_point_helper<long double>
507#ifdef __STDCPP_FLOAT16_T__
509 struct __is_floating_point_helper<_Float16>
513#ifdef __STDCPP_FLOAT32_T__
515 struct __is_floating_point_helper<_Float32>
519#ifdef __STDCPP_FLOAT64_T__
521 struct __is_floating_point_helper<_Float64>
525#ifdef __STDCPP_FLOAT128_T__
527 struct __is_floating_point_helper<_Float128>
531#ifdef __STDCPP_BFLOAT16_T__
533 struct __is_floating_point_helper<__gnu_cxx::__bfloat16_t>
537#ifdef _GLIBCXX_USE_FLOAT128
539 struct __is_floating_point_helper<__float128>
545 template<
typename _Tp>
547 :
public __is_floating_point_helper<__remove_cv_t<_Tp>>
::type
551#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_array)
552 template<
typename _Tp>
554 :
public __bool_constant<__is_array(_Tp)>
561 template<
typename _Tp, std::
size_t _Size>
562 struct is_array<_Tp[_Size]>
563 :
public true_type { };
565 template<
typename _Tp>
571#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_pointer)
572 template<
typename _Tp>
574 :
public __bool_constant<__is_pointer(_Tp)>
577 template<
typename _Tp>
581 template<
typename _Tp>
582 struct is_pointer<_Tp*>
583 :
public true_type { };
585 template<
typename _Tp>
589 template<
typename _Tp>
593 template<
typename _Tp>
603 template<
typename _Tp>
612 template<
typename _Tp>
617#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_object_pointer)
618 template<
typename _Tp>
620 :
public __bool_constant<__is_member_object_pointer(_Tp)>
624 struct __is_member_object_pointer_helper
627 template<
typename _Tp,
typename _Cp>
628 struct __is_member_object_pointer_helper<_Tp _Cp::*>
629 :
public __not_<is_function<_Tp>>::type { };
632 template<
typename _Tp>
634 :
public __is_member_object_pointer_helper<__remove_cv_t<_Tp>>::type
638#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_function_pointer)
640 template<
typename _Tp>
642 :
public __bool_constant<__is_member_function_pointer(_Tp)>
646 struct __is_member_function_pointer_helper
649 template<
typename _Tp,
typename _Cp>
650 struct __is_member_function_pointer_helper<_Tp _Cp::*>
651 :
public is_function<_Tp>::type { };
654 template<
typename _Tp>
656 :
public __is_member_function_pointer_helper<__remove_cv_t<_Tp>>::type
661 template<
typename _Tp>
663 :
public __bool_constant<__is_enum(_Tp)>
667 template<
typename _Tp>
669 :
public __bool_constant<__is_union(_Tp)>
673 template<
typename _Tp>
675 :
public __bool_constant<__is_class(_Tp)>
679#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_function)
680 template<
typename _Tp>
682 :
public __bool_constant<__is_function(_Tp)>
685 template<
typename _Tp>
687 :
public __bool_constant<!is_const<const _Tp>::value> { };
689 template<
typename _Tp>
690 struct is_function<_Tp&>
691 :
public false_type { };
693 template<
typename _Tp>
698#ifdef __cpp_lib_is_null_pointer
700 template<typename _Tp>
701 struct is_null_pointer
705 struct is_null_pointer<std::nullptr_t>
709 struct is_null_pointer<const std::nullptr_t>
713 struct is_null_pointer<volatile std::nullptr_t>
717 struct is_null_pointer<const volatile std::nullptr_t>
722 template<
typename _Tp>
723 struct __is_nullptr_t
724 :
public is_null_pointer<_Tp>
725 { } _GLIBCXX_DEPRECATED_SUGGEST(
"std::is_null_pointer");
731#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_reference)
732 template<
typename _Tp>
734 :
public __bool_constant<__is_reference(_Tp)>
737 template<
typename _Tp>
742 template<
typename _Tp>
743 struct is_reference<_Tp&>
747 template<
typename _Tp>
754 template<
typename _Tp>
756 :
public __or_<is_integral<_Tp>, is_floating_point<_Tp>>
::type
760 template<
typename _Tp>
762 :
public __or_<is_arithmetic<_Tp>, is_void<_Tp>,
763 is_null_pointer<_Tp>>
::type
767#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_object)
768 template<
typename _Tp>
770 :
public __bool_constant<__is_object(_Tp)>
773 template<
typename _Tp>
775 :
public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
781 struct is_member_pointer;
784 template<
typename _Tp>
786 :
public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
787 is_member_pointer<_Tp>, is_null_pointer<_Tp>>
::type
791 template<
typename _Tp>
793 :
public __bool_constant<!is_fundamental<_Tp>::value> { };
796#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_pointer)
797 template<
typename _Tp>
799 :
public __bool_constant<__is_member_pointer(_Tp)>
803 template<
typename _Tp>
804 struct __is_member_pointer_helper
807 template<
typename _Tp,
typename _Cp>
808 struct __is_member_pointer_helper<_Tp _Cp::*>
809 :
public true_type { };
812 template<
typename _Tp>
814 :
public __is_member_pointer_helper<__remove_cv_t<_Tp>>::type
818 template<
typename,
typename>
822 template<
typename _Tp,
typename... _Types>
823 using __is_one_of = __or_<is_same<_Tp, _Types>...>;
827 template<
typename _Tp>
828 using __is_signed_integer = __is_one_of<__remove_cv_t<_Tp>,
829 signed char,
signed short,
signed int,
signed long,
831#if defined(__GLIBCXX_TYPE_INT_N_0)
832 ,
signed __GLIBCXX_TYPE_INT_N_0
834#if defined(__GLIBCXX_TYPE_INT_N_1)
835 ,
signed __GLIBCXX_TYPE_INT_N_1
837#if defined(__GLIBCXX_TYPE_INT_N_2)
838 ,
signed __GLIBCXX_TYPE_INT_N_2
840#if defined(__GLIBCXX_TYPE_INT_N_3)
841 ,
signed __GLIBCXX_TYPE_INT_N_3
847 template<
typename _Tp>
848 using __is_unsigned_integer = __is_one_of<__remove_cv_t<_Tp>,
849 unsigned char,
unsigned short,
unsigned int,
unsigned long,
851#if defined(__GLIBCXX_TYPE_INT_N_0)
852 ,
unsigned __GLIBCXX_TYPE_INT_N_0
854#if defined(__GLIBCXX_TYPE_INT_N_1)
855 ,
unsigned __GLIBCXX_TYPE_INT_N_1
857#if defined(__GLIBCXX_TYPE_INT_N_2)
858 ,
unsigned __GLIBCXX_TYPE_INT_N_2
860#if defined(__GLIBCXX_TYPE_INT_N_3)
861 ,
unsigned __GLIBCXX_TYPE_INT_N_3
866 template<
typename _Tp>
867 using __is_standard_integer
868 = __or_<__is_signed_integer<_Tp>, __is_unsigned_integer<_Tp>>;
871 template<
typename...>
using __void_t = void;
877#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_const)
878 template<
typename _Tp>
880 :
public __bool_constant<__is_const(_Tp)>
887 template<
typename _Tp>
888 struct is_const<_Tp const>
889 :
public true_type { };
893#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_volatile)
894 template<
typename _Tp>
896 :
public __bool_constant<__is_volatile(_Tp)>
903 template<
typename _Tp>
904 struct is_volatile<_Tp volatile>
905 :
public true_type { };
915 template<
typename _Tp>
917 _GLIBCXX26_DEPRECATED_SUGGEST(
"is_trivially_default_constructible && is_trivially_copyable")
919 : public __bool_constant<__is_trivial(_Tp)>
921 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
922 "template argument must be a complete class or an unbounded array");
926 template<
typename _Tp>
928 :
public __bool_constant<__is_trivially_copyable(_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_standard_layout(_Tp)>
939 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
940 "template argument must be a complete class or an unbounded array");
948 template<
typename _Tp>
950 _GLIBCXX20_DEPRECATED_SUGGEST(
"is_standard_layout && is_trivial")
952 : public __bool_constant<__is_pod(_Tp)>
954 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
955 "template argument must be a complete class or an unbounded array");
962 template<
typename _Tp>
964 _GLIBCXX17_DEPRECATED
966 :
public __bool_constant<__is_literal_type(_Tp)>
968 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
969 "template argument must be a complete class or an unbounded array");
973 template<
typename _Tp>
975 :
public __bool_constant<__is_empty(_Tp)>
979 template<
typename _Tp>
981 :
public __bool_constant<__is_polymorphic(_Tp)>
984#ifdef __cpp_lib_is_final
987 template<typename _Tp>
989 :
public __bool_constant<__is_final(_Tp)>
994 template<
typename _Tp>
996 :
public __bool_constant<__is_abstract(_Tp)>
1000 template<
typename _Tp,
1002 struct __is_signed_helper
1005 template<
typename _Tp>
1006 struct __is_signed_helper<_Tp, true>
1007 :
public __bool_constant<_Tp(-1) < _Tp(0)>
1012 template<typename _Tp>
1014 : public __is_signed_helper<_Tp>::type
1018 template<typename _Tp>
1020 : public __and_<is_arithmetic<_Tp>, __not_<is_signed<_Tp>>>::type
1024 template<typename _Tp, typename _Up = _Tp&&>
1028 template<typename _Tp>
1033 template<typename _Tp>
1034 auto declval() noexcept -> decltype(__declval<_Tp>(0));
1040 template<typename _Tp>
1041 struct __is_array_known_bounds
1045 template<
typename _Tp,
size_t _Size>
1046 struct __is_array_known_bounds<_Tp[_Size]>
1050 template<
typename _Tp>
1051 struct __is_array_unknown_bounds
1055 template<
typename _Tp>
1056 struct __is_array_unknown_bounds<_Tp[]>
1063#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_destructible)
1065 template<
typename _Tp>
1067 :
public __bool_constant<__is_destructible(_Tp)>
1077 struct __do_is_destructible_impl
1079 template<typename _Tp, typename = decltype(declval<_Tp&>().~_Tp())>
1086 template<
typename _Tp>
1087 struct __is_destructible_impl
1088 :
public __do_is_destructible_impl
1090 using type =
decltype(__test<_Tp>(0));
1093 template<
typename _Tp,
1094 bool = __or_<is_void<_Tp>,
1095 __is_array_unknown_bounds<_Tp>,
1098 struct __is_destructible_safe;
1100 template<
typename _Tp>
1101 struct __is_destructible_safe<_Tp, false, false>
1102 :
public __is_destructible_impl<typename
1103 remove_all_extents<_Tp>::type>::type
1106 template<
typename _Tp>
1107 struct __is_destructible_safe<_Tp, true, false>
1110 template<
typename _Tp>
1111 struct __is_destructible_safe<_Tp, false, true>
1116 template<
typename _Tp>
1118 :
public __is_destructible_safe<_Tp>::type
1120 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1121 "template argument must be a complete class or an unbounded array");
1125#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_destructible)
1127 template<
typename _Tp>
1129 :
public __bool_constant<__is_nothrow_destructible(_Tp)>
1138 struct __do_is_nt_destructible_impl
1140 template<
typename _Tp>
1141 static __bool_constant<noexcept(declval<_Tp&>().~_Tp())>
1148 template<
typename _Tp>
1149 struct __is_nt_destructible_impl
1150 :
public __do_is_nt_destructible_impl
1152 using type =
decltype(__test<_Tp>(0));
1155 template<
typename _Tp,
1156 bool = __or_<is_void<_Tp>,
1157 __is_array_unknown_bounds<_Tp>,
1160 struct __is_nt_destructible_safe;
1162 template<
typename _Tp>
1163 struct __is_nt_destructible_safe<_Tp, false, false>
1164 :
public __is_nt_destructible_impl<typename
1165 remove_all_extents<_Tp>::type>::type
1168 template<
typename _Tp>
1169 struct __is_nt_destructible_safe<_Tp, true, false>
1172 template<
typename _Tp>
1173 struct __is_nt_destructible_safe<_Tp, false, true>
1178 template<
typename _Tp>
1180 :
public __is_nt_destructible_safe<_Tp>::type
1182 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1183 "template argument must be a complete class or an unbounded array");
1188 template<
typename _Tp,
typename... _Args>
1189 using __is_constructible_impl
1190 = __bool_constant<__is_constructible(_Tp, _Args...)>;
1194 template<
typename _Tp,
typename... _Args>
1196 :
public __is_constructible_impl<_Tp, _Args...>
1198 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1199 "template argument must be a complete class or an unbounded array");
1203 template<
typename _Tp>
1205 :
public __is_constructible_impl<_Tp>
1207 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1208 "template argument must be a complete class or an unbounded array");
1212#if _GLIBCXX_USE_BUILTIN_TRAIT(__add_lvalue_reference)
1213 template<
typename _Tp>
1214 using __add_lval_ref_t = __add_lvalue_reference(_Tp);
1216 template<
typename _Tp,
typename =
void>
1217 struct __add_lvalue_reference_helper
1218 {
using type = _Tp; };
1220 template<
typename _Tp>
1221 struct __add_lvalue_reference_helper<_Tp, __void_t<_Tp&>>
1222 {
using type = _Tp&; };
1224 template<
typename _Tp>
1225 using __add_lval_ref_t =
typename __add_lvalue_reference_helper<_Tp>::type;
1230 template<
typename _Tp>
1232 :
public __is_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>>
1234 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1235 "template argument must be a complete class or an unbounded array");
1239#if _GLIBCXX_USE_BUILTIN_TRAIT(__add_rvalue_reference)
1240 template<
typename _Tp>
1241 using __add_rval_ref_t = __add_rvalue_reference(_Tp);
1243 template<
typename _Tp,
typename =
void>
1244 struct __add_rvalue_reference_helper
1245 {
using type = _Tp; };
1247 template<
typename _Tp>
1248 struct __add_rvalue_reference_helper<_Tp, __void_t<_Tp&&>>
1249 {
using type = _Tp&&; };
1251 template<
typename _Tp>
1252 using __add_rval_ref_t =
typename __add_rvalue_reference_helper<_Tp>::type;
1257 template<
typename _Tp>
1259 :
public __is_constructible_impl<_Tp, __add_rval_ref_t<_Tp>>
1261 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1262 "template argument must be a complete class or an unbounded array");
1266 template<
typename _Tp,
typename... _Args>
1267 using __is_nothrow_constructible_impl
1268 = __bool_constant<__is_nothrow_constructible(_Tp, _Args...)>;
1272 template<
typename _Tp,
typename... _Args>
1274 :
public __is_nothrow_constructible_impl<_Tp, _Args...>
1276 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1277 "template argument must be a complete class or an unbounded array");
1281 template<
typename _Tp>
1283 :
public __is_nothrow_constructible_impl<_Tp>
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, __add_lval_ref_t<const _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_rval_ref_t<_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,
typename _Up>
1309 using __is_assignable_impl = __bool_constant<__is_assignable(_Tp, _Up)>;
1313 template<
typename _Tp,
typename _Up>
1315 :
public __is_assignable_impl<_Tp, _Up>
1317 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1318 "template argument must be a complete class or an unbounded array");
1322 template<
typename _Tp>
1324 :
public __is_assignable_impl<__add_lval_ref_t<_Tp>,
1325 __add_lval_ref_t<const _Tp>>
1327 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1328 "template argument must be a complete class or an unbounded array");
1332 template<
typename _Tp>
1334 :
public __is_assignable_impl<__add_lval_ref_t<_Tp>, __add_rval_ref_t<_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,
typename _Up>
1342 using __is_nothrow_assignable_impl
1343 = __bool_constant<__is_nothrow_assignable(_Tp, _Up)>;
1347 template<
typename _Tp,
typename _Up>
1349 :
public __is_nothrow_assignable_impl<_Tp, _Up>
1351 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1352 "template argument must be a complete class or an unbounded array");
1356 template<
typename _Tp>
1358 :
public __is_nothrow_assignable_impl<__add_lval_ref_t<_Tp>,
1359 __add_lval_ref_t<const _Tp>>
1361 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1362 "template argument must be a complete class or an unbounded array");
1366 template<
typename _Tp>
1368 :
public __is_nothrow_assignable_impl<__add_lval_ref_t<_Tp>,
1369 __add_rval_ref_t<_Tp>>
1371 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1372 "template argument must be a complete class or an unbounded array");
1376 template<
typename _Tp,
typename... _Args>
1377 using __is_trivially_constructible_impl
1378 = __bool_constant<__is_trivially_constructible(_Tp, _Args...)>;
1382 template<
typename _Tp,
typename... _Args>
1384 :
public __is_trivially_constructible_impl<_Tp, _Args...>
1386 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1387 "template argument must be a complete class or an unbounded array");
1391 template<
typename _Tp>
1393 :
public __is_trivially_constructible_impl<_Tp>
1395 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1396 "template argument must be a complete class or an unbounded array");
1399#if __cpp_variable_templates && __cpp_concepts
1400 template<
typename _Tp>
1401 constexpr bool __is_implicitly_default_constructible_v
1402 =
requires (void(&__f)(_Tp)) { __f({}); };
1404 template<
typename _Tp>
1405 struct __is_implicitly_default_constructible
1406 : __bool_constant<__is_implicitly_default_constructible_v<_Tp>>
1409 struct __do_is_implicitly_default_constructible_impl
1411 template <
typename _Tp>
1412 static void __helper(
const _Tp&);
1414 template <
typename _Tp>
1416 decltype(__helper<const _Tp&>({}))* = 0);
1421 template<
typename _Tp>
1422 struct __is_implicitly_default_constructible_impl
1423 :
public __do_is_implicitly_default_constructible_impl
1428 template<
typename _Tp>
1429 struct __is_implicitly_default_constructible_safe
1430 :
public __is_implicitly_default_constructible_impl<_Tp>::type
1433 template <
typename _Tp>
1434 struct __is_implicitly_default_constructible
1435 :
public __and_<__is_constructible_impl<_Tp>,
1436 __is_implicitly_default_constructible_safe<_Tp>>::type
1441 template<
typename _Tp>
1443 :
public __is_trivially_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>>
1445 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1446 "template argument must be a complete class or an unbounded array");
1450 template<
typename _Tp>
1452 :
public __is_trivially_constructible_impl<_Tp, __add_rval_ref_t<_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,
typename _Up>
1460 using __is_trivially_assignable_impl
1461 = __bool_constant<__is_trivially_assignable(_Tp, _Up)>;
1465 template<
typename _Tp,
typename _Up>
1467 :
public __is_trivially_assignable_impl<_Tp, _Up>
1469 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1470 "template argument must be a complete class or an unbounded array");
1474 template<
typename _Tp>
1476 :
public __is_trivially_assignable_impl<__add_lval_ref_t<_Tp>,
1477 __add_lval_ref_t<const _Tp>>
1479 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1480 "template argument must be a complete class or an unbounded array");
1484 template<
typename _Tp>
1486 :
public __is_trivially_assignable_impl<__add_lval_ref_t<_Tp>,
1487 __add_rval_ref_t<_Tp>>
1489 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1490 "template argument must be a complete class or an unbounded array");
1493#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_trivially_destructible)
1495 template<
typename _Tp>
1497 :
public __bool_constant<__is_trivially_destructible(_Tp)>
1501 template<
typename _Tp>
1503 :
public __and_<__is_destructible_safe<_Tp>,
1504 __bool_constant<__has_trivial_destructor(_Tp)>>
::type
1506 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1507 "template argument must be a complete class or an unbounded array");
1512 template<
typename _Tp>
1514 :
public __bool_constant<__has_virtual_destructor(_Tp)>
1516 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1517 "template argument must be a complete class or an unbounded array");
1524 template<
typename _Tp>
1528 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
1529 "template argument must be a complete class or an unbounded array");
1533#if _GLIBCXX_USE_BUILTIN_TRAIT(__array_rank) \
1534 && (!defined(__clang__) || __clang_major__ >= 20)
1535 template<
typename _Tp>
1543 template<
typename _Tp, std::
size_t _Size>
1544 struct rank<_Tp[_Size]>
1545 :
public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
1547 template<
typename _Tp>
1553 template<
typename,
unsigned _U
int = 0>
1557 template<
typename _Tp,
size_t _Size>
1558 struct extent<_Tp[_Size], 0>
1561 template<
typename _Tp,
unsigned _U
int,
size_t _Size>
1562 struct extent<_Tp[_Size], _Uint>
1563 :
public extent<_Tp, _Uint - 1>::type { };
1565 template<
typename _Tp>
1569 template<
typename _Tp,
unsigned _U
int>
1570 struct extent<_Tp[], _Uint>
1571 :
public extent<_Tp, _Uint - 1>::type { };
1577#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_same)
1578 template<
typename _Tp,
typename _Up>
1580 :
public __bool_constant<__is_same(_Tp, _Up)>
1583 template<
typename _Tp,
typename _Up>
1588 template<
typename _Tp>
1589 struct is_same<_Tp, _Tp>
1595 template<
typename _Base,
typename _Derived>
1597 :
public __bool_constant<__is_base_of(_Base, _Derived)>
1600#ifdef __cpp_lib_is_virtual_base_of
1603 template<typename _Base, typename _Derived>
1604 struct is_virtual_base_of
1605 :
public bool_constant<__builtin_is_virtual_base_of(_Base, _Derived)>
1609#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_convertible)
1610 template<
typename _From,
typename _To>
1611 struct is_convertible
1612 :
public __bool_constant<__is_convertible(_From, _To)>
1615 template<
typename _From,
typename _To,
1618 struct __is_convertible_helper
1620 using type =
typename is_void<_To>::type;
1623#pragma GCC diagnostic push
1624#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
1625 template<
typename _From,
typename _To>
1626 class __is_convertible_helper<_From, _To, false>
1628 template<
typename _To1>
1629 static void __test_aux(_To1)
noexcept;
1631 template<
typename _From1,
typename _To1,
1636 template<
typename,
typename>
1641 using type =
decltype(__test<_From, _To>(0));
1643#pragma GCC diagnostic pop
1646 template<
typename _From,
typename _To>
1647 struct is_convertible
1648 :
public __is_convertible_helper<_From, _To>::type
1653 template<
typename _ToElementType,
typename _FromElementType>
1654 using __is_array_convertible
1655 = is_convertible<_FromElementType(*)[], _ToElementType(*)[]>;
1657#ifdef __cpp_lib_is_nothrow_convertible
1659#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_convertible)
1661 template<
typename _From,
typename _To>
1662 inline constexpr bool is_nothrow_convertible_v
1663 = __is_nothrow_convertible(_From, _To);
1666 template<
typename _From,
typename _To>
1667 struct is_nothrow_convertible
1668 :
public bool_constant<is_nothrow_convertible_v<_From, _To>>
1671 template<
typename _From,
typename _To,
1674 struct __is_nt_convertible_helper
1678#pragma GCC diagnostic push
1679#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
1680 template<
typename _From,
typename _To>
1681 class __is_nt_convertible_helper<_From, _To, false>
1683 template<
typename _To1>
1684 static void __test_aux(_To1)
noexcept;
1686 template<
typename _From1,
typename _To1>
1691 template<
typename,
typename>
1696 using type =
decltype(__test<_From, _To>(0));
1698#pragma GCC diagnostic pop
1701 template<
typename _From,
typename _To>
1702 struct is_nothrow_convertible
1703 :
public __is_nt_convertible_helper<_From, _To>::type
1707 template<
typename _From,
typename _To>
1708 inline constexpr bool is_nothrow_convertible_v
1709 = is_nothrow_convertible<_From, _To>::value;
1713#pragma GCC diagnostic push
1714#pragma GCC diagnostic ignored "-Wc++14-extensions"
1715 template<
typename _Tp,
typename... _Args>
1716 struct __is_nothrow_new_constructible_impl
1718 noexcept(::new(std::declval<void*>()) _Tp(std::declval<_Args>()...))
1722 template<
typename _Tp,
typename... _Args>
1723 _GLIBCXX17_INLINE
constexpr bool __is_nothrow_new_constructible
1725 __is_nothrow_new_constructible_impl<_Tp, _Args...>>::value;
1726#pragma GCC diagnostic pop
1731 template<
typename _Tp>
1733 {
using type = _Tp; };
1735 template<
typename _Tp>
1737 {
using type = _Tp; };
1740 template<
typename _Tp>
1742 {
using type = _Tp; };
1744 template<
typename _Tp>
1746 {
using type = _Tp; };
1749#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_cv)
1750 template<
typename _Tp>
1752 {
using type = __remove_cv(_Tp); };
1754 template<
typename _Tp>
1756 {
using type = _Tp; };
1758 template<
typename _Tp>
1759 struct remove_cv<const _Tp>
1760 {
using type = _Tp; };
1762 template<
typename _Tp>
1764 {
using type = _Tp; };
1766 template<
typename _Tp>
1768 {
using type = _Tp; };
1772 template<
typename _Tp>
1774 {
using type = _Tp
const; };
1777 template<
typename _Tp>
1779 {
using type = _Tp
volatile; };
1782 template<
typename _Tp>
1784 {
using type = _Tp
const volatile; };
1786#ifdef __cpp_lib_transformation_trait_aliases
1788 template<typename _Tp>
1789 using remove_const_t =
typename remove_const<_Tp>::type;
1792 template<
typename _Tp>
1793 using remove_volatile_t =
typename remove_volatile<_Tp>::type;
1796 template<
typename _Tp>
1797 using remove_cv_t =
typename remove_cv<_Tp>::type;
1800 template<
typename _Tp>
1801 using add_const_t =
typename add_const<_Tp>::type;
1804 template<
typename _Tp>
1805 using add_volatile_t =
typename add_volatile<_Tp>::type;
1808 template<
typename _Tp>
1809 using add_cv_t =
typename add_cv<_Tp>::type;
1815#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_reference)
1816 template<
typename _Tp>
1818 {
using type = __remove_reference(_Tp); };
1820 template<
typename _Tp>
1822 {
using type = _Tp; };
1824 template<
typename _Tp>
1825 struct remove_reference<_Tp&>
1826 {
using type = _Tp; };
1828 template<
typename _Tp>
1830 {
using type = _Tp; };
1834 template<
typename _Tp>
1836 {
using type = __add_lval_ref_t<_Tp>; };
1839 template<
typename _Tp>
1841 {
using type = __add_rval_ref_t<_Tp>; };
1843#if __cplusplus > 201103L
1845 template<
typename _Tp>
1849 template<
typename _Tp>
1853 template<
typename _Tp>
1862 template<
typename _Unqualified,
bool _IsConst,
bool _IsVol>
1863 struct __cv_selector;
1865 template<
typename _Unqualified>
1866 struct __cv_selector<_Unqualified, false, false>
1867 {
using __type = _Unqualified; };
1869 template<
typename _Unqualified>
1870 struct __cv_selector<_Unqualified, false, true>
1871 {
using __type =
volatile _Unqualified; };
1873 template<
typename _Unqualified>
1874 struct __cv_selector<_Unqualified, true, false>
1875 {
using __type =
const _Unqualified; };
1877 template<
typename _Unqualified>
1878 struct __cv_selector<_Unqualified, true, true>
1879 {
using __type =
const volatile _Unqualified; };
1881 template<
typename _Qualified,
typename _Unqualified,
1884 class __match_cv_qualifiers
1886 using __match = __cv_selector<_Unqualified, _IsConst, _IsVol>;
1889 using __type =
typename __match::__type;
1893 template<
typename _Tp>
1894 struct __make_unsigned
1895 {
using __type = _Tp; };
1898 struct __make_unsigned<char>
1899 {
using __type =
unsigned char; };
1902 struct __make_unsigned<signed char>
1903 {
using __type =
unsigned char; };
1906 struct __make_unsigned<short>
1907 {
using __type =
unsigned short; };
1910 struct __make_unsigned<int>
1911 {
using __type =
unsigned int; };
1914 struct __make_unsigned<long>
1915 {
using __type =
unsigned long; };
1918 struct __make_unsigned<long long>
1919 {
using __type =
unsigned long long; };
1921#if defined(__GLIBCXX_TYPE_INT_N_0)
1924 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_0>
1925 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_0; };
1927#if defined(__GLIBCXX_TYPE_INT_N_1)
1930 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_1>
1931 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_1; };
1933#if defined(__GLIBCXX_TYPE_INT_N_2)
1936 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_2>
1937 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_2; };
1939#if defined(__GLIBCXX_TYPE_INT_N_3)
1942 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_3>
1943 {
using __type =
unsigned __GLIBCXX_TYPE_INT_N_3; };
1945#if defined __SIZEOF_INT128__ && defined __STRICT_ANSI__
1948 struct __make_unsigned<__int128>
1949 {
using __type =
unsigned __int128; };
1953 template<
typename _Tp,
1955 bool _IsEnum = __is_enum(_Tp)>
1956 class __make_unsigned_selector;
1958 template<
typename _Tp>
1959 class __make_unsigned_selector<_Tp, true, false>
1961 using __unsigned_type
1962 =
typename __make_unsigned<__remove_cv_t<_Tp>>::__type;
1966 =
typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type;
1969 class __make_unsigned_selector_base
1972 template<
typename...>
struct _List { };
1974 template<
typename _Tp,
typename... _Up>
1975 struct _List<_Tp, _Up...> : _List<_Up...>
1976 {
static constexpr size_t __size =
sizeof(_Tp); };
1978 template<
size_t _Sz,
typename _Tp,
bool = (_Sz <= _Tp::__size)>
1981 template<
size_t _Sz,
typename _U
int,
typename... _UInts>
1982 struct __select<_Sz, _List<_Uint, _UInts...>,
true>
1983 {
using __type = _Uint; };
1985 template<
size_t _Sz,
typename _Uint,
typename... _UInts>
1986 struct __select<_Sz, _List<_Uint, _UInts...>, false>
1987 : __select<_Sz, _List<_UInts...>>
1992 template<
typename _Tp>
1993 class __make_unsigned_selector<_Tp, false, true>
1994 : __make_unsigned_selector_base
1998 using _UInts = _List<
unsigned char,
unsigned short,
unsigned int,
1999 unsigned long,
unsigned long long
2000#ifdef __SIZEOF_INT128__
2005 using __unsigned_type =
typename __select<
sizeof(_Tp), _UInts>::__type;
2009 =
typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type;
2017 struct __make_unsigned<wchar_t>
2020 =
typename __make_unsigned_selector<wchar_t, false, true>::__type;
2023#ifdef _GLIBCXX_USE_CHAR8_T
2025 struct __make_unsigned<char8_t>
2028 =
typename __make_unsigned_selector<char8_t, false, true>::__type;
2033 struct __make_unsigned<char16_t>
2036 =
typename __make_unsigned_selector<char16_t, false, true>::__type;
2040 struct __make_unsigned<char32_t>
2043 =
typename __make_unsigned_selector<char32_t, false, true>::__type;
2051 template<
typename _Tp>
2053 {
using type =
typename __make_unsigned_selector<_Tp>::__type; };
2064 template<
typename _Tp>
2065 struct __make_signed
2066 {
using __type = _Tp; };
2069 struct __make_signed<char>
2070 {
using __type =
signed char; };
2073 struct __make_signed<unsigned char>
2074 {
using __type =
signed char; };
2077 struct __make_signed<unsigned short>
2078 {
using __type =
signed short; };
2081 struct __make_signed<unsigned int>
2082 {
using __type =
signed int; };
2085 struct __make_signed<unsigned long>
2086 {
using __type =
signed long; };
2089 struct __make_signed<unsigned long long>
2090 {
using __type =
signed long long; };
2092#if defined(__GLIBCXX_TYPE_INT_N_0)
2095 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_0>
2096 {
using __type = __GLIBCXX_TYPE_INT_N_0; };
2098#if defined(__GLIBCXX_TYPE_INT_N_1)
2101 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_1>
2102 {
using __type = __GLIBCXX_TYPE_INT_N_1; };
2104#if defined(__GLIBCXX_TYPE_INT_N_2)
2107 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_2>
2108 {
using __type = __GLIBCXX_TYPE_INT_N_2; };
2110#if defined(__GLIBCXX_TYPE_INT_N_3)
2113 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_3>
2114 {
using __type = __GLIBCXX_TYPE_INT_N_3; };
2116#if defined __SIZEOF_INT128__ && defined __STRICT_ANSI__
2119 struct __make_signed<unsigned __int128>
2120 {
using __type = __int128; };
2124 template<
typename _Tp,
2126 bool _IsEnum = __is_enum(_Tp)>
2127 class __make_signed_selector;
2129 template<
typename _Tp>
2130 class __make_signed_selector<_Tp, true, false>
2133 =
typename __make_signed<__remove_cv_t<_Tp>>::__type;
2137 =
typename __match_cv_qualifiers<_Tp, __signed_type>::__type;
2141 template<
typename _Tp>
2142 class __make_signed_selector<_Tp, false, true>
2144 using __unsigned_type =
typename __make_unsigned_selector<_Tp>::__type;
2147 using __type =
typename __make_signed_selector<__unsigned_type>::__type;
2155 struct __make_signed<wchar_t>
2158 =
typename __make_signed_selector<wchar_t, false, true>::__type;
2161#if defined(_GLIBCXX_USE_CHAR8_T)
2163 struct __make_signed<char8_t>
2166 =
typename __make_signed_selector<char8_t, false, true>::__type;
2171 struct __make_signed<char16_t>
2174 =
typename __make_signed_selector<char16_t, false, true>::__type;
2178 struct __make_signed<char32_t>
2181 =
typename __make_signed_selector<char32_t, false, true>::__type;
2189 template<
typename _Tp>
2191 {
using type =
typename __make_signed_selector<_Tp>::__type; };
2197 template<>
struct make_signed<bool const volatile>;
2199#if __cplusplus > 201103L
2201 template<
typename _Tp>
2205 template<
typename _Tp>
2212#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_extent)
2213 template<
typename _Tp>
2215 {
using type = __remove_extent(_Tp); };
2217 template<
typename _Tp>
2219 {
using type = _Tp; };
2221 template<
typename _Tp, std::
size_t _Size>
2222 struct remove_extent<_Tp[_Size]>
2223 {
using type = _Tp; };
2225 template<
typename _Tp>
2227 {
using type = _Tp; };
2231#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_all_extents)
2232 template<
typename _Tp>
2234 {
using type = __remove_all_extents(_Tp); };
2236 template<
typename _Tp>
2238 {
using type = _Tp; };
2240 template<
typename _Tp, std::
size_t _Size>
2241 struct remove_all_extents<_Tp[_Size]>
2242 {
using type =
typename remove_all_extents<_Tp>::type; };
2244 template<
typename _Tp>
2246 {
using type =
typename remove_all_extents<_Tp>::type; };
2249#if __cplusplus > 201103L
2251 template<
typename _Tp>
2255 template<
typename _Tp>
2262#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_pointer)
2263 template<
typename _Tp>
2265 {
using type = __remove_pointer(_Tp); };
2267 template<
typename _Tp,
typename>
2268 struct __remove_pointer_helper
2269 {
using type = _Tp; };
2271 template<
typename _Tp,
typename _Up>
2272 struct __remove_pointer_helper<_Tp, _Up*>
2273 {
using type = _Up; };
2275 template<
typename _Tp>
2277 :
public __remove_pointer_helper<_Tp, __remove_cv_t<_Tp>>
2282#if _GLIBCXX_USE_BUILTIN_TRAIT(__add_pointer)
2283 template<
typename _Tp>
2285 {
using type = __add_pointer(_Tp); };
2287 template<
typename _Tp,
typename =
void>
2288 struct __add_pointer_helper
2289 {
using type = _Tp; };
2291 template<
typename _Tp>
2292 struct __add_pointer_helper<_Tp, __void_t<_Tp*>>
2293 {
using type = _Tp*; };
2295 template<
typename _Tp>
2297 :
public __add_pointer_helper<_Tp>
2300 template<
typename _Tp>
2302 {
using type = _Tp*; };
2304 template<
typename _Tp>
2306 {
using type = _Tp*; };
2309#if __cplusplus > 201103L
2311 template<
typename _Tp>
2315 template<
typename _Tp>
2322 struct __attribute__((__aligned__)) __aligned_storage_max_align_t
2326 __aligned_storage_default_alignment([[__maybe_unused__]]
size_t __len)
2328#if _GLIBCXX_INLINE_VERSION
2330 = integral_constant<size_t,
alignof(__aligned_storage_max_align_t)>;
2332 return __len > (_Max_align::value / 2)
2334#
if _GLIBCXX_USE_BUILTIN_TRAIT(__builtin_clzg)
2335 : 1 << (__SIZE_WIDTH__ - __builtin_clzg(__len - 1u));
2337 : 1 << (__LLONG_WIDTH__ - __builtin_clzll(__len - 1ull));
2342 return alignof(__aligned_storage_max_align_t);
2378 template<
size_t _Len,
2379 size_t _Align = __aligned_storage_default_alignment(_Len)>
2381 _GLIBCXX23_DEPRECATED
2386 alignas(_Align)
unsigned char __data[_Len];
2390 template <
typename... _Types>
2391 struct __strictest_alignment
2393 static const size_t _S_alignment = 0;
2394 static const size_t _S_size = 0;
2397 template <
typename _Tp,
typename... _Types>
2398 struct __strictest_alignment<_Tp, _Types...>
2400 static const size_t _S_alignment =
2401 alignof(_Tp) > __strictest_alignment<_Types...>::_S_alignment
2402 ?
alignof(_Tp) : __strictest_alignment<_Types...>::_S_alignment;
2403 static const size_t _S_size =
2404 sizeof(_Tp) > __strictest_alignment<_Types...>::_S_size
2405 ?
sizeof(_Tp) : __strictest_alignment<_Types...>::_S_size;
2408#pragma GCC diagnostic push
2409#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2423 template <
size_t _Len,
typename... _Types>
2425 _GLIBCXX23_DEPRECATED
2429 static_assert(
sizeof...(_Types) != 0,
"At least one type is required");
2431 using __strictest = __strictest_alignment<_Types...>;
2432 static const size_t _S_len = _Len > __strictest::_S_size
2433 ? _Len : __strictest::_S_size;
2438 using type =
typename aligned_storage<_S_len, alignment_value>::type;
2441 template <
size_t _Len,
typename... _Types>
2442 const size_t aligned_union<_Len, _Types...>::alignment_value;
2443#pragma GCC diagnostic pop
2447#if _GLIBCXX_USE_BUILTIN_TRAIT(__decay)
2448 template<
typename _Tp>
2450 {
using type = __decay(_Tp); };
2454 template<
typename _Up>
2455 struct __decay_selector
2456 : __conditional_t<is_const<const _Up>::value,
2461 template<
typename _Up,
size_t _Nm>
2462 struct __decay_selector<_Up[_Nm]>
2463 {
using type = _Up*; };
2465 template<
typename _Up>
2466 struct __decay_selector<_Up[]>
2467 {
using type = _Up*; };
2472 template<
typename _Tp>
2474 {
using type =
typename __decay_selector<_Tp>::type; };
2476 template<
typename _Tp>
2478 {
using type =
typename __decay_selector<_Tp>::type; };
2480 template<
typename _Tp>
2482 {
using type =
typename __decay_selector<_Tp>::type; };
2488 template<
typename _Tp>
2489 struct __strip_reference_wrapper
2494 template<
typename _Tp>
2497 using __type = _Tp&;
2501 template<
typename _Tp>
2502 using __decay_t =
typename decay<_Tp>::type;
2504 template<
typename _Tp>
2505 using __decay_and_strip = __strip_reference_wrapper<__decay_t<_Tp>>;
2511 template<
typename... _Cond>
2512 using _Require = __enable_if_t<__and_<_Cond...>::value>;
2515 template<
typename _Tp>
2516 using __remove_cvref_t
2522 template<
bool _Cond,
typename _Iftrue,
typename _Iffalse>
2524 {
using type = _Iftrue; };
2527 template<
typename _Iftrue,
typename _Iffalse>
2529 {
using type = _Iffalse; };
2532 template<
typename... _Tp>
2544 template<
typename _Tp>
2545 struct __success_type
2546 {
using type = _Tp; };
2548 struct __failure_type
2551 struct __do_common_type_impl
2553 template<
typename _Tp,
typename _Up>
2559 template<
typename _Tp,
typename _Up>
2560 static __success_type<__decay_t<__cond_t<_Tp, _Up>>>
2563#if __cplusplus > 201703L
2566 template<
typename _Tp,
typename _Up>
2567 static __success_type<__remove_cvref_t<__cond_t<const _Tp&, const _Up&>>>
2571 template<
typename,
typename>
2572 static __failure_type
2575 template<
typename _Tp,
typename _Up>
2576 static decltype(_S_test_2<_Tp, _Up>(0))
2586 template<
typename _Tp0>
2592 template<
typename _Tp1,
typename _Tp2,
2593 typename _Dp1 = __decay_t<_Tp1>,
typename _Dp2 = __decay_t<_Tp2>>
2594 struct __common_type_impl
2598 using type = common_type<_Dp1, _Dp2>;
2601 template<
typename _Tp1,
typename _Tp2>
2602 struct __common_type_impl<_Tp1, _Tp2, _Tp1, _Tp2>
2603 :
private __do_common_type_impl
2607 using type =
decltype(_S_test<_Tp1, _Tp2>(0));
2611 template<
typename _Tp1,
typename _Tp2>
2613 :
public __common_type_impl<_Tp1, _Tp2>::type
2616 template<
typename...>
2617 struct __common_type_pack
2620 template<
typename,
typename,
typename =
void>
2621 struct __common_type_fold;
2624 template<
typename _Tp1,
typename _Tp2,
typename... _Rp>
2626 :
public __common_type_fold<common_type<_Tp1, _Tp2>,
2627 __common_type_pack<_Rp...>>
2633 template<
typename _CTp,
typename... _Rp>
2634 struct __common_type_fold<_CTp, __common_type_pack<_Rp...>,
2635 __void_t<typename _CTp::
type>>
2640 template<
typename _CTp,
typename _Rp>
2641 struct __common_type_fold<_CTp, _Rp, void>
2644 template<
typename _Tp,
bool = __is_enum(_Tp)>
2645 struct __underlying_type_impl
2647 using type = __underlying_type(_Tp);
2650 template<
typename _Tp>
2651 struct __underlying_type_impl<_Tp, false>
2656 template<
typename _Tp>
2658 :
public __underlying_type_impl<_Tp>
2662 template<
typename _Tp>
2663 struct __declval_protector
2665 static const bool __stop =
false;
2673 template<
typename _Tp>
2674 auto declval() noexcept -> decltype(__declval<_Tp>(0))
2676 static_assert(__declval_protector<_Tp>::__stop,
2677 "declval() must not be used!");
2678 return __declval<_Tp>(0);
2682 template<
typename _Signature>
2688 struct __invoke_memfun_ref { };
2689 struct __invoke_memfun_deref { };
2690 struct __invoke_memobj_ref { };
2691 struct __invoke_memobj_deref { };
2692 struct __invoke_other { };
2695 template<
typename _Tp,
typename _Tag>
2696 struct __result_of_success : __success_type<_Tp>
2697 {
using __invoke_type = _Tag; };
2700 struct __result_of_memfun_ref_impl
2702 template<
typename _Fp,
typename _Tp1,
typename... _Args>
2703 static __result_of_success<
decltype(
2705 ), __invoke_memfun_ref> _S_test(
int);
2707 template<
typename...>
2708 static __failure_type _S_test(...);
2711 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2712 struct __result_of_memfun_ref
2713 :
private __result_of_memfun_ref_impl
2715 using type =
decltype(_S_test<_MemPtr, _Arg, _Args...>(0));
2719 struct __result_of_memfun_deref_impl
2721 template<
typename _Fp,
typename _Tp1,
typename... _Args>
2722 static __result_of_success<
decltype(
2724 ), __invoke_memfun_deref> _S_test(
int);
2726 template<
typename...>
2727 static __failure_type _S_test(...);
2730 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2731 struct __result_of_memfun_deref
2732 :
private __result_of_memfun_deref_impl
2734 using type =
decltype(_S_test<_MemPtr, _Arg, _Args...>(0));
2738 struct __result_of_memobj_ref_impl
2740 template<
typename _Fp,
typename _Tp1>
2741 static __result_of_success<
decltype(
2743 ), __invoke_memobj_ref> _S_test(
int);
2745 template<
typename,
typename>
2746 static __failure_type _S_test(...);
2749 template<
typename _MemPtr,
typename _Arg>
2750 struct __result_of_memobj_ref
2751 :
private __result_of_memobj_ref_impl
2753 using type =
decltype(_S_test<_MemPtr, _Arg>(0));
2757 struct __result_of_memobj_deref_impl
2759 template<
typename _Fp,
typename _Tp1>
2760 static __result_of_success<
decltype(
2762 ), __invoke_memobj_deref> _S_test(
int);
2764 template<
typename,
typename>
2765 static __failure_type _S_test(...);
2768 template<
typename _MemPtr,
typename _Arg>
2769 struct __result_of_memobj_deref
2770 :
private __result_of_memobj_deref_impl
2772 using type =
decltype(_S_test<_MemPtr, _Arg>(0));
2775 template<
typename _MemPtr,
typename _Arg>
2776 struct __result_of_memobj;
2778 template<
typename _Res,
typename _Class,
typename _Arg>
2779 struct __result_of_memobj<_Res _Class::*, _Arg>
2781 using _Argval = __remove_cvref_t<_Arg>;
2782 using _MemPtr = _Res _Class::*;
2783 using type =
typename __conditional_t<__or_<is_same<_Argval, _Class>,
2784 is_base_of<_Class, _Argval>>::value,
2785 __result_of_memobj_ref<_MemPtr, _Arg>,
2786 __result_of_memobj_deref<_MemPtr, _Arg>
2790 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2791 struct __result_of_memfun;
2793 template<
typename _Res,
typename _Class,
typename _Arg,
typename... _Args>
2794 struct __result_of_memfun<_Res _Class::*, _Arg, _Args...>
2796 using _Argval =
typename remove_reference<_Arg>::type;
2797 using _MemPtr = _Res _Class::*;
2798 using type =
typename __conditional_t<is_base_of<_Class, _Argval>::value,
2799 __result_of_memfun_ref<_MemPtr, _Arg, _Args...>,
2800 __result_of_memfun_deref<_MemPtr, _Arg, _Args...>
2809 template<
typename _Tp,
typename _Up = __remove_cvref_t<_Tp>>
2815 template<
typename _Tp,
typename _Up>
2821 template<bool, bool,
typename _Functor,
typename... _ArgTypes>
2822 struct __result_of_impl
2824 using type = __failure_type;
2827 template<
typename _MemPtr,
typename _Arg>
2828 struct __result_of_impl<true, false, _MemPtr, _Arg>
2829 :
public __result_of_memobj<__decay_t<_MemPtr>,
2830 typename __inv_unwrap<_Arg>::type>
2833 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2834 struct __result_of_impl<false, true, _MemPtr, _Arg, _Args...>
2835 :
public __result_of_memfun<__decay_t<_MemPtr>,
2836 typename __inv_unwrap<_Arg>::type, _Args...>
2840 struct __result_of_other_impl
2842 template<
typename _Fn,
typename... _Args>
2843 static __result_of_success<
decltype(
2845 ), __invoke_other> _S_test(
int);
2847 template<
typename...>
2848 static __failure_type _S_test(...);
2851 template<
typename _Functor,
typename... _ArgTypes>
2852 struct __result_of_impl<false, false, _Functor, _ArgTypes...>
2853 :
private __result_of_other_impl
2855 using type =
decltype(_S_test<_Functor, _ArgTypes...>(0));
2859 template<
typename _Functor,
typename... _ArgTypes>
2860 struct __invoke_result
2861 :
public __result_of_impl<
2862 is_member_object_pointer<
2863 typename remove_reference<_Functor>::type
2865 is_member_function_pointer<
2866 typename remove_reference<_Functor>::type
2868 _Functor, _ArgTypes...
2873 template<
typename _Fn,
typename... _Args>
2874 using __invoke_result_t =
typename __invoke_result<_Fn, _Args...>::type;
2877 template<
typename _Functor,
typename... _ArgTypes>
2878 struct result_of<_Functor(_ArgTypes...)>
2879 :
public __invoke_result<_Functor, _ArgTypes...>
2880 { } _GLIBCXX17_DEPRECATED_SUGGEST(
"std::invoke_result");
2882#if __cplusplus >= 201402L
2883#pragma GCC diagnostic push
2884#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2886 template<
size_t _Len,
2887 size_t _Align = __aligned_storage_default_alignment(_Len)>
2888 using aligned_storage_t _GLIBCXX23_DEPRECATED =
typename aligned_storage<_Len, _Align>::type;
2890 template <
size_t _Len,
typename... _Types>
2891 using aligned_union_t _GLIBCXX23_DEPRECATED =
typename aligned_union<_Len, _Types...>
::type;
2892#pragma GCC diagnostic pop
2895 template<
typename _Tp>
2896 using decay_t =
typename decay<_Tp>::type;
2899 template<
bool _Cond,
typename _Tp =
void>
2903 template<
bool _Cond,
typename _Iftrue,
typename _Iffalse>
2904 using conditional_t =
typename conditional<_Cond, _Iftrue, _Iffalse>::type;
2907 template<
typename... _Tp>
2911 template<
typename _Tp>
2915 template<
typename _Tp>
2919#ifdef __cpp_lib_void_t
2921 template<typename...> using void_t = void;
2931 template<
typename _Def,
template<
typename...>
class _Op,
typename... _Args>
2932 struct __detected_or
2939 template<
typename _Def,
template<
typename...>
class _Op,
typename... _Args>
2940 requires requires {
typename _Op<_Args...>; }
2941 struct __detected_or<_Def, _Op, _Args...>
2943 using type = _Op<_Args...>;
2948 template<
typename _Default,
typename _AlwaysVoid,
2949 template<
typename...>
class _Op,
typename... _Args>
2952 using type = _Default;
2957 template<
typename _Default,
template<
typename...>
class _Op,
2959 struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...>
2961 using type = _Op<_Args...>;
2965 template<
typename _Default,
template<
typename...>
class _Op,
2967 using __detected_or = __detector<_Default, void, _Op, _Args...>;
2971 template<
typename _Default,
template<
typename...>
class _Op,
2973 using __detected_or_t
2974 =
typename __detected_or<_Default, _Op, _Args...>::type;
2980#define _GLIBCXX_HAS_NESTED_TYPE(_NTYPE) \
2981 template<typename _Tp, typename = __void_t<>> \
2982 struct __has_##_NTYPE \
2985 template<typename _Tp> \
2986 struct __has_##_NTYPE<_Tp, __void_t<typename _Tp::_NTYPE>> \
2990 template <
typename _Tp>
2991 struct __is_swappable;
2993 template <
typename _Tp>
2994 struct __is_nothrow_swappable;
3001 template<
typename _Tp>
3002 struct __is_tuple_like
3003 :
public __is_tuple_like_impl<__remove_cvref_t<_Tp>>::type
3007 template<
typename _Tp>
3008 _GLIBCXX20_CONSTEXPR
3010 _Require<__not_<__is_tuple_like<_Tp>>,
3014 noexcept(__and_<is_nothrow_move_constructible<_Tp>,
3017 template<
typename _Tp,
size_t _Nm>
3018 _GLIBCXX20_CONSTEXPR
3020 __enable_if_t<__is_swappable<_Tp>::value>
3021 swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
3022 noexcept(__is_nothrow_swappable<_Tp>::value);
3025 namespace __swappable_details {
3028 struct __do_is_swappable_impl
3030 template<
typename _Tp,
typename
3032 static true_type __test(
int);
3038 struct __do_is_nothrow_swappable_impl
3040 template<
typename _Tp>
3041 static __bool_constant<
3051 template<
typename _Tp>
3052 struct __is_swappable_impl
3053 :
public __swappable_details::__do_is_swappable_impl
3055 using type =
decltype(__test<_Tp>(0));
3058 template<
typename _Tp>
3059 struct __is_nothrow_swappable_impl
3060 :
public __swappable_details::__do_is_nothrow_swappable_impl
3062 using type =
decltype(__test<_Tp>(0));
3065 template<
typename _Tp>
3066 struct __is_swappable
3067 :
public __is_swappable_impl<_Tp>::type
3070 template<
typename _Tp>
3071 struct __is_nothrow_swappable
3072 :
public __is_nothrow_swappable_impl<_Tp>::type
3076#ifdef __cpp_lib_is_swappable
3080 template<
typename _Tp>
3082 :
public __is_swappable_impl<_Tp>::type
3084 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3085 "template argument must be a complete class or an unbounded array");
3089 template<
typename _Tp>
3090 struct is_nothrow_swappable
3091 :
public __is_nothrow_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");
3097#if __cplusplus >= 201402L
3099 template<
typename _Tp>
3100 _GLIBCXX17_INLINE
constexpr bool is_swappable_v =
3101 is_swappable<_Tp>::value;
3104 template<
typename _Tp>
3105 _GLIBCXX17_INLINE
constexpr bool is_nothrow_swappable_v =
3106 is_nothrow_swappable<_Tp>::value;
3110 namespace __swappable_with_details {
3113 struct __do_is_swappable_with_impl
3115 template<
typename _Tp,
typename _Up,
typename
3121 template<
typename,
typename>
3125 struct __do_is_nothrow_swappable_with_impl
3127 template<
typename _Tp,
typename _Up>
3128 static __bool_constant<
3134 template<
typename,
typename>
3140 template<
typename _Tp,
typename _Up>
3141 struct __is_swappable_with_impl
3142 :
public __swappable_with_details::__do_is_swappable_with_impl
3144 using type =
decltype(__test<_Tp, _Up>(0));
3148 template<
typename _Tp>
3149 struct __is_swappable_with_impl<_Tp&, _Tp&>
3150 :
public __swappable_details::__do_is_swappable_impl
3152 using type =
decltype(__test<_Tp&>(0));
3155 template<
typename _Tp,
typename _Up>
3156 struct __is_nothrow_swappable_with_impl
3157 :
public __swappable_with_details::__do_is_nothrow_swappable_with_impl
3159 using type =
decltype(__test<_Tp, _Up>(0));
3163 template<
typename _Tp>
3164 struct __is_nothrow_swappable_with_impl<_Tp&, _Tp&>
3165 :
public __swappable_details::__do_is_nothrow_swappable_impl
3167 using type =
decltype(__test<_Tp&>(0));
3172 template<
typename _Tp,
typename _Up>
3173 struct is_swappable_with
3174 :
public __is_swappable_with_impl<_Tp, _Up>::type
3176 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3177 "first template argument must be a complete class or an unbounded array");
3178 static_assert(std::__is_complete_or_unbounded(__type_identity<_Up>{}),
3179 "second template argument must be a complete class or an unbounded array");
3183 template<
typename _Tp,
typename _Up>
3184 struct is_nothrow_swappable_with
3185 :
public __is_nothrow_swappable_with_impl<_Tp, _Up>::type
3187 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3188 "first template argument must be a complete class or an unbounded array");
3189 static_assert(std::__is_complete_or_unbounded(__type_identity<_Up>{}),
3190 "second template argument must be a complete class or an unbounded array");
3193#if __cplusplus >= 201402L
3195 template<
typename _Tp,
typename _Up>
3196 _GLIBCXX17_INLINE
constexpr bool is_swappable_with_v =
3197 is_swappable_with<_Tp, _Up>::value;
3200 template<
typename _Tp,
typename _Up>
3201 _GLIBCXX17_INLINE
constexpr bool is_nothrow_swappable_with_v =
3202 is_nothrow_swappable_with<_Tp, _Up>::value;
3212 template<
typename _Result,
typename _Ret,
3214 struct __is_invocable_impl
3221 template<
typename _Result,
typename _Ret>
3222 struct __is_invocable_impl<_Result, _Ret,
3224 __void_t<typename _Result::
type>>
3230#pragma GCC diagnostic push
3231#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
3233 template<
typename _Result,
typename _Ret>
3234 struct __is_invocable_impl<_Result, _Ret,
3236 __void_t<typename _Result::
type>>
3240 using _Res_t =
typename _Result::type;
3244 static _Res_t _S_get() noexcept;
3247 template<typename _Tp>
3248 static
void _S_conv(__type_identity_t<_Tp>) noexcept;
3251 template<typename _Tp,
3252 bool _Nothrow = noexcept(_S_conv<_Tp>(_S_get())),
3253 typename = decltype(_S_conv<_Tp>(_S_get())),
3254#if __has_builtin(__reference_converts_from_temporary)
3255 bool _Dangle = __reference_converts_from_temporary(_Tp, _Res_t)
3257 bool _Dangle =
false
3260 static __bool_constant<_Nothrow && !_Dangle>
3263 template<
typename _Tp,
bool = false>
3269 using type =
decltype(_S_test<_Ret,
true>(1));
3272 using __nothrow_conv =
decltype(_S_test<_Ret>(1));
3274#pragma GCC diagnostic pop
3276 template<
typename _Fn,
typename... _ArgTypes>
3277 struct __is_invocable
3278#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_invocable)
3279 : __bool_constant<__is_invocable(_Fn, _ArgTypes...)>
3281 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type
3285 template<
typename _Fn,
typename _Tp,
typename... _Args>
3286 constexpr bool __call_is_nt(__invoke_memfun_ref)
3288 using _Up =
typename __inv_unwrap<_Tp>::type;
3293 template<
typename _Fn,
typename _Tp,
typename... _Args>
3294 constexpr bool __call_is_nt(__invoke_memfun_deref)
3300 template<
typename _Fn,
typename _Tp>
3301 constexpr bool __call_is_nt(__invoke_memobj_ref)
3303 using _Up =
typename __inv_unwrap<_Tp>::type;
3307 template<
typename _Fn,
typename _Tp>
3308 constexpr bool __call_is_nt(__invoke_memobj_deref)
3313 template<
typename _Fn,
typename... _Args>
3314 constexpr bool __call_is_nt(__invoke_other)
3319 template<
typename _Result,
typename _Fn,
typename... _Args>
3320 struct __call_is_nothrow
3322 std::__call_is_nt<_Fn, _Args...>(typename _Result::__invoke_type{})
3326 template<
typename _Fn,
typename... _Args>
3327 using __call_is_nothrow_
3328 = __call_is_nothrow<__invoke_result<_Fn, _Args...>, _Fn, _Args...>;
3331 template<
typename _Fn,
typename... _Args>
3332 struct __is_nothrow_invocable
3333#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_invocable)
3334 : __bool_constant<__is_nothrow_invocable(_Fn, _Args...)>
3336 : __and_<__is_invocable<_Fn, _Args...>,
3337 __call_is_nothrow_<_Fn, _Args...>>::type
3341#pragma GCC diagnostic push
3342#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
3343 struct __nonesuchbase {};
3344 struct __nonesuch :
private __nonesuchbase {
3345 ~__nonesuch() =
delete;
3346 __nonesuch(__nonesuch
const&) =
delete;
3347 void operator=(__nonesuch
const&) =
delete;
3349#pragma GCC diagnostic pop
3352#ifdef __cpp_lib_is_invocable
3354 template<typename _Functor, typename... _ArgTypes>
3355 struct invoke_result
3356 :
public __invoke_result<_Functor, _ArgTypes...>
3358 static_assert(std::__is_complete_or_unbounded(__type_identity<_Functor>{}),
3359 "_Functor must be a complete class or an unbounded array");
3360 static_assert((std::__is_complete_or_unbounded(
3361 __type_identity<_ArgTypes>{}) && ...),
3362 "each argument type must be a complete class or an unbounded array");
3366 template<
typename _Fn,
typename... _Args>
3367 using invoke_result_t =
typename invoke_result<_Fn, _Args...>::type;
3370 template<
typename _Fn,
typename... _ArgTypes>
3372#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_invocable)
3373 :
public __bool_constant<__is_invocable(_Fn, _ArgTypes...)>
3375 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type
3378 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3379 "_Fn must be a complete class or an unbounded array");
3380 static_assert((std::__is_complete_or_unbounded(
3381 __type_identity<_ArgTypes>{}) && ...),
3382 "each argument type must be a complete class or an unbounded array");
3386 template<
typename _Ret,
typename _Fn,
typename... _ArgTypes>
3387 struct is_invocable_r
3388 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>::type
3390 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3391 "_Fn must be a complete class or an unbounded array");
3392 static_assert((std::__is_complete_or_unbounded(
3393 __type_identity<_ArgTypes>{}) && ...),
3394 "each argument type must be a complete class or an unbounded array");
3395 static_assert(std::__is_complete_or_unbounded(__type_identity<_Ret>{}),
3396 "_Ret must be a complete class or an unbounded array");
3400 template<
typename _Fn,
typename... _ArgTypes>
3401 struct is_nothrow_invocable
3402#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_invocable)
3403 :
public __bool_constant<__is_nothrow_invocable(_Fn, _ArgTypes...)>
3405 : __and_<__is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>,
3406 __call_is_nothrow_<_Fn, _ArgTypes...>>::type
3409 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3410 "_Fn must be a complete class or an unbounded array");
3411 static_assert((std::__is_complete_or_unbounded(
3412 __type_identity<_ArgTypes>{}) && ...),
3413 "each argument type must be a complete class or an unbounded array");
3420 template<
typename _Result,
typename _Ret>
3421 using __is_nt_invocable_impl
3422 =
typename __is_invocable_impl<_Result, _Ret>::__nothrow_conv;
3426 template<
typename _Ret,
typename _Fn,
typename... _ArgTypes>
3427 struct is_nothrow_invocable_r
3428 : __and_<__is_nt_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>,
3429 __call_is_nothrow_<_Fn, _ArgTypes...>>::type
3431 static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}),
3432 "_Fn must be a complete class or an unbounded array");
3433 static_assert((std::__is_complete_or_unbounded(
3434 __type_identity<_ArgTypes>{}) && ...),
3435 "each argument type must be a complete class or an unbounded array");
3436 static_assert(std::__is_complete_or_unbounded(__type_identity<_Ret>{}),
3437 "_Ret must be a complete class or an unbounded array");
3441#if __cpp_lib_type_trait_variable_templates
3456template <
typename _Tp>
3458template <
typename _Tp>
3459 inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value;
3460template <
typename _Tp>
3462template <
typename _Tp>
3465#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_array)
3466template <
typename _Tp>
3467 inline constexpr bool is_array_v = __is_array(_Tp);
3469template <
typename _Tp>
3470 inline constexpr bool is_array_v =
false;
3471template <
typename _Tp>
3472 inline constexpr bool is_array_v<_Tp[]> =
true;
3473template <
typename _Tp,
size_t _Num>
3474 inline constexpr bool is_array_v<_Tp[_Num]> =
true;
3477#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_pointer)
3478template <
typename _Tp>
3479 inline constexpr bool is_pointer_v = __is_pointer(_Tp);
3481template <
typename _Tp>
3482 inline constexpr bool is_pointer_v =
false;
3483template <
typename _Tp>
3484 inline constexpr bool is_pointer_v<_Tp*> =
true;
3485template <
typename _Tp>
3486 inline constexpr bool is_pointer_v<_Tp* const> =
true;
3487template <
typename _Tp>
3488 inline constexpr bool is_pointer_v<_Tp* volatile> =
true;
3489template <
typename _Tp>
3490 inline constexpr bool is_pointer_v<_Tp* const volatile> =
true;
3493template <
typename _Tp>
3494 inline constexpr bool is_lvalue_reference_v =
false;
3495template <
typename _Tp>
3496 inline constexpr bool is_lvalue_reference_v<_Tp&> =
true;
3497template <
typename _Tp>
3498 inline constexpr bool is_rvalue_reference_v =
false;
3499template <
typename _Tp>
3500 inline constexpr bool is_rvalue_reference_v<_Tp&&> =
true;
3502#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_object_pointer)
3503template <
typename _Tp>
3504 inline constexpr bool is_member_object_pointer_v =
3505 __is_member_object_pointer(_Tp);
3507template <
typename _Tp>
3508 inline constexpr bool is_member_object_pointer_v =
3512#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_function_pointer)
3513template <
typename _Tp>
3514 inline constexpr bool is_member_function_pointer_v =
3515 __is_member_function_pointer(_Tp);
3517template <
typename _Tp>
3518 inline constexpr bool is_member_function_pointer_v =
3522template <
typename _Tp>
3523 inline constexpr bool is_enum_v = __is_enum(_Tp);
3524template <
typename _Tp>
3525 inline constexpr bool is_union_v = __is_union(_Tp);
3526template <
typename _Tp>
3527 inline constexpr bool is_class_v = __is_class(_Tp);
3530#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_reference)
3531template <
typename _Tp>
3532 inline constexpr bool is_reference_v = __is_reference(_Tp);
3534template <
typename _Tp>
3535 inline constexpr bool is_reference_v =
false;
3536template <
typename _Tp>
3537 inline constexpr bool is_reference_v<_Tp&> =
true;
3538template <
typename _Tp>
3539 inline constexpr bool is_reference_v<_Tp&&> =
true;
3542template <
typename _Tp>
3544template <
typename _Tp>
3547#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_object)
3548template <
typename _Tp>
3549 inline constexpr bool is_object_v = __is_object(_Tp);
3551template <
typename _Tp>
3555template <
typename _Tp>
3557template <
typename _Tp>
3558 inline constexpr bool is_compound_v = !is_fundamental_v<_Tp>;
3560#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_member_pointer)
3561template <
typename _Tp>
3562 inline constexpr bool is_member_pointer_v = __is_member_pointer(_Tp);
3564template <
typename _Tp>
3568#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_const)
3569template <
typename _Tp>
3570 inline constexpr bool is_const_v = __is_const(_Tp);
3572template <
typename _Tp>
3573 inline constexpr bool is_const_v =
false;
3574template <
typename _Tp>
3575 inline constexpr bool is_const_v<const _Tp> =
true;
3578#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_function)
3579template <
typename _Tp>
3580 inline constexpr bool is_function_v = __is_function(_Tp);
3582template <
typename _Tp>
3583 inline constexpr bool is_function_v = !is_const_v<const _Tp>;
3584template <
typename _Tp>
3585 inline constexpr bool is_function_v<_Tp&> =
false;
3586template <
typename _Tp>
3587 inline constexpr bool is_function_v<_Tp&&> =
false;
3590#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_volatile)
3591template <
typename _Tp>
3592 inline constexpr bool is_volatile_v = __is_volatile(_Tp);
3594template <
typename _Tp>
3595 inline constexpr bool is_volatile_v =
false;
3596template <
typename _Tp>
3597 inline constexpr bool is_volatile_v<volatile _Tp> =
true;
3600template <
typename _Tp>
3601 _GLIBCXX26_DEPRECATED_SUGGEST(
"is_trivially_default_constructible_v && is_trivially_copyable_v")
3602 inline constexpr
bool is_trivial_v = __is_trivial(_Tp);
3603template <typename _Tp>
3604 inline constexpr
bool is_trivially_copyable_v = __is_trivially_copyable(_Tp);
3605template <typename _Tp>
3606 inline constexpr
bool is_standard_layout_v = __is_standard_layout(_Tp);
3607template <typename _Tp>
3608 _GLIBCXX20_DEPRECATED_SUGGEST(
"is_standard_layout_v && is_trivial_v")
3609 inline constexpr
bool is_pod_v = __is_pod(_Tp);
3610template <typename _Tp>
3611 _GLIBCXX17_DEPRECATED
3612 inline constexpr
bool is_literal_type_v = __is_literal_type(_Tp);
3613template <typename _Tp>
3614 inline constexpr
bool is_empty_v = __is_empty(_Tp);
3615template <typename _Tp>
3616 inline constexpr
bool is_polymorphic_v = __is_polymorphic(_Tp);
3617template <typename _Tp>
3618 inline constexpr
bool is_abstract_v = __is_abstract(_Tp);
3619template <typename _Tp>
3620 inline constexpr
bool is_final_v = __is_final(_Tp);
3622template <typename _Tp>
3623 inline constexpr
bool is_signed_v =
is_signed<_Tp>::value;
3624template <typename _Tp>
3625 inline constexpr
bool is_unsigned_v =
is_unsigned<_Tp>::value;
3627template <typename _Tp, typename... _Args>
3628 inline constexpr
bool is_constructible_v = __is_constructible(_Tp, _Args...);
3629template <typename _Tp>
3630 inline constexpr
bool is_default_constructible_v = __is_constructible(_Tp);
3631template <typename _Tp>
3632 inline constexpr
bool is_copy_constructible_v
3633 = __is_constructible(_Tp, __add_lval_ref_t<const _Tp>);
3634template <typename _Tp>
3635 inline constexpr
bool is_move_constructible_v
3636 = __is_constructible(_Tp, __add_rval_ref_t<_Tp>);
3638template <typename _Tp, typename _Up>
3639 inline constexpr
bool is_assignable_v = __is_assignable(_Tp, _Up);
3640template <typename _Tp>
3641 inline constexpr
bool is_copy_assignable_v
3642 = __is_assignable(__add_lval_ref_t<_Tp>, __add_lval_ref_t<const _Tp>);
3643template <typename _Tp>
3644 inline constexpr
bool is_move_assignable_v
3645 = __is_assignable(__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>);
3647#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_destructible)
3648template <
typename _Tp>
3649 inline constexpr bool is_destructible_v = __is_destructible(_Tp);
3651template <
typename _Tp>
3655template <
typename _Tp,
typename... _Args>
3656 inline constexpr bool is_trivially_constructible_v
3657 = __is_trivially_constructible(_Tp, _Args...);
3658template <
typename _Tp>
3659 inline constexpr bool is_trivially_default_constructible_v
3660 = __is_trivially_constructible(_Tp);
3661template <
typename _Tp>
3662 inline constexpr bool is_trivially_copy_constructible_v
3663 = __is_trivially_constructible(_Tp, __add_lval_ref_t<const _Tp>);
3664template <
typename _Tp>
3665 inline constexpr bool is_trivially_move_constructible_v
3666 = __is_trivially_constructible(_Tp, __add_rval_ref_t<_Tp>);
3668template <
typename _Tp,
typename _Up>
3669 inline constexpr bool is_trivially_assignable_v
3670 = __is_trivially_assignable(_Tp, _Up);
3671template <
typename _Tp>
3672 inline constexpr bool is_trivially_copy_assignable_v
3673 = __is_trivially_assignable(__add_lval_ref_t<_Tp>,
3674 __add_lval_ref_t<const _Tp>);
3675template <
typename _Tp>
3676 inline constexpr bool is_trivially_move_assignable_v
3677 = __is_trivially_assignable(__add_lval_ref_t<_Tp>,
3678 __add_rval_ref_t<_Tp>);
3680#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_trivially_destructible)
3681template <
typename _Tp>
3682 inline constexpr bool is_trivially_destructible_v
3683 = __is_trivially_destructible(_Tp);
3685template <
typename _Tp>
3686 inline constexpr bool is_trivially_destructible_v =
false;
3688template <
typename _Tp>
3689 requires (!is_reference_v<_Tp>) &&
requires (_Tp& __t) { __t.~_Tp(); }
3690 inline constexpr bool is_trivially_destructible_v<_Tp>
3691 = __has_trivial_destructor(_Tp);
3692template <
typename _Tp>
3693 inline constexpr bool is_trivially_destructible_v<_Tp&> =
true;
3694template <
typename _Tp>
3695 inline constexpr bool is_trivially_destructible_v<_Tp&&> =
true;
3696template <
typename _Tp,
size_t _Nm>
3697 inline constexpr bool is_trivially_destructible_v<_Tp[_Nm]>
3698 = is_trivially_destructible_v<_Tp>;
3700template <
typename _Tp>
3701 inline constexpr bool is_trivially_destructible_v =
3705template <
typename _Tp,
typename... _Args>
3706 inline constexpr bool is_nothrow_constructible_v
3707 = __is_nothrow_constructible(_Tp, _Args...);
3708template <
typename _Tp>
3709 inline constexpr bool is_nothrow_default_constructible_v
3710 = __is_nothrow_constructible(_Tp);
3711template <
typename _Tp>
3712 inline constexpr bool is_nothrow_copy_constructible_v
3713 = __is_nothrow_constructible(_Tp, __add_lval_ref_t<const _Tp>);
3714template <
typename _Tp>
3715 inline constexpr bool is_nothrow_move_constructible_v
3716 = __is_nothrow_constructible(_Tp, __add_rval_ref_t<_Tp>);
3718template <
typename _Tp,
typename _Up>
3719 inline constexpr bool is_nothrow_assignable_v
3720 = __is_nothrow_assignable(_Tp, _Up);
3721template <
typename _Tp>
3722 inline constexpr bool is_nothrow_copy_assignable_v
3723 = __is_nothrow_assignable(__add_lval_ref_t<_Tp>,
3724 __add_lval_ref_t<const _Tp>);
3725template <
typename _Tp>
3726 inline constexpr bool is_nothrow_move_assignable_v
3727 = __is_nothrow_assignable(__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>);
3729#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_destructible)
3730template <
typename _Tp>
3731 inline constexpr bool is_nothrow_destructible_v
3732 = __is_nothrow_destructible(_Tp);
3734template <
typename _Tp>
3735 inline constexpr bool is_nothrow_destructible_v =
3739template <
typename _Tp>
3740 inline constexpr bool has_virtual_destructor_v
3741 = __has_virtual_destructor(_Tp);
3743template <
typename _Tp>
3744 inline constexpr size_t alignment_of_v = alignment_of<_Tp>::value;
3746#if _GLIBCXX_USE_BUILTIN_TRAIT(__array_rank) \
3747 && (!defined(__clang__) || __clang_major__ >= 20)
3748template <
typename _Tp>
3749 inline constexpr size_t rank_v = __array_rank(_Tp);
3751template <
typename _Tp>
3752 inline constexpr size_t rank_v = 0;
3753template <
typename _Tp,
size_t _Size>
3754 inline constexpr size_t rank_v<_Tp[_Size]> = 1 + rank_v<_Tp>;
3755template <
typename _Tp>
3756 inline constexpr size_t rank_v<_Tp[]> = 1 + rank_v<_Tp>;
3759template <
typename _Tp,
unsigned _Idx = 0>
3760 inline constexpr size_t extent_v = 0;
3761template <
typename _Tp,
size_t _Size>
3762 inline constexpr size_t extent_v<_Tp[_Size], 0> = _Size;
3763template <
typename _Tp,
unsigned _Idx,
size_t _Size>
3764 inline constexpr size_t extent_v<_Tp[_Size], _Idx> = extent_v<_Tp, _Idx - 1>;
3765template <
typename _Tp>
3766 inline constexpr size_t extent_v<_Tp[], 0> = 0;
3767template <
typename _Tp,
unsigned _Idx>
3768 inline constexpr size_t extent_v<_Tp[], _Idx> = extent_v<_Tp, _Idx - 1>;
3770#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_same)
3771template <
typename _Tp,
typename _Up>
3772 inline constexpr bool is_same_v = __is_same(_Tp, _Up);
3774template <
typename _Tp,
typename _Up>
3775 inline constexpr bool is_same_v =
false;
3776template <
typename _Tp>
3777 inline constexpr bool is_same_v<_Tp, _Tp> =
true;
3779template <
typename _Base,
typename _Derived>
3780 inline constexpr bool is_base_of_v = __is_base_of(_Base, _Derived);
3781#ifdef __cpp_lib_is_virtual_base_of
3782template <
typename _Base,
typename _Derived>
3783 inline constexpr bool is_virtual_base_of_v = __builtin_is_virtual_base_of(_Base, _Derived);
3785#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_convertible)
3786template <
typename _From,
typename _To>
3787 inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
3789template <
typename _From,
typename _To>
3790 inline constexpr bool is_convertible_v = is_convertible<_From, _To>::value;
3792template<
typename _Fn,
typename... _Args>
3793 inline constexpr bool is_invocable_v
3794#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_invocable)
3795 = __is_invocable(_Fn, _Args...);
3797 = is_invocable<_Fn, _Args...>::value;
3799template<
typename _Fn,
typename... _Args>
3800 inline constexpr bool is_nothrow_invocable_v
3801#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_nothrow_invocable)
3802 = __is_nothrow_invocable(_Fn, _Args...);
3804 = is_nothrow_invocable<_Fn, _Args...>::value;
3806template<
typename _Ret,
typename _Fn,
typename... _Args>
3807 inline constexpr bool is_invocable_r_v
3808 = is_invocable_r<_Ret, _Fn, _Args...>::value;
3809template<
typename _Ret,
typename _Fn,
typename... _Args>
3810 inline constexpr bool is_nothrow_invocable_r_v
3811 = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value;
3815#ifdef __cpp_lib_has_unique_object_representations
3818 template<typename _Tp>
3819 struct has_unique_object_representations
3820 : bool_constant<__has_unique_object_representations(
3821 remove_cv_t<remove_all_extents_t<_Tp>>
3824 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
3825 "template argument must be a complete class or an unbounded array");
3828# if __cpp_lib_type_trait_variable_templates
3830 template<typename _Tp>
3831 inline constexpr bool has_unique_object_representations_v
3832 = has_unique_object_representations<_Tp>::value;
3836#ifdef __cpp_lib_is_aggregate
3839 template<typename _Tp>
3841 : bool_constant<__is_aggregate(remove_cv_t<_Tp>)>
3844# if __cpp_lib_type_trait_variable_templates
3849 template<
typename _Tp>
3850 inline constexpr bool is_aggregate_v = __is_aggregate(remove_cv_t<_Tp>);
3858#ifdef __cpp_lib_remove_cvref
3859# if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_cvref)
3860 template<
typename _Tp>
3862 {
using type = __remove_cvref(_Tp); };
3864 template<
typename _Tp>
3866 {
using type =
typename remove_cv<_Tp>::type; };
3868 template<
typename _Tp>
3869 struct remove_cvref<_Tp&>
3870 {
using type =
typename remove_cv<_Tp>::type; };
3872 template<
typename _Tp>
3873 struct remove_cvref<_Tp&&>
3874 {
using type =
typename remove_cv<_Tp>::type; };
3877 template<
typename _Tp>
3878 using remove_cvref_t =
typename remove_cvref<_Tp>::type;
3882#ifdef __cpp_lib_type_identity
3887 template<
typename _Tp>
3888 struct type_identity {
using type = _Tp; };
3890 template<
typename _Tp>
3891 using type_identity_t =
typename type_identity<_Tp>::type;
3895#ifdef __cpp_lib_unwrap_ref
3900 template<
typename _Tp>
3901 struct unwrap_reference {
using type = _Tp; };
3903 template<
typename _Tp>
3906 template<
typename _Tp>
3907 using unwrap_reference_t =
typename unwrap_reference<_Tp>::type;
3914 template<
typename _Tp>
3915 struct unwrap_ref_decay {
using type = unwrap_reference_t<decay_t<_Tp>>; };
3917 template<
typename _Tp>
3918 using unwrap_ref_decay_t =
typename unwrap_ref_decay<_Tp>::type;
3922#ifdef __cpp_lib_bounded_array_traits
3926# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_bounded_array)
3927 template<
typename _Tp>
3928 inline constexpr bool is_bounded_array_v = __is_bounded_array(_Tp);
3930 template<
typename _Tp>
3931 inline constexpr bool is_bounded_array_v =
false;
3933 template<
typename _Tp,
size_t _Size>
3934 inline constexpr bool is_bounded_array_v<_Tp[_Size]> =
true;
3940# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_unbounded_array)
3941 template<
typename _Tp>
3942 inline constexpr bool is_unbounded_array_v = __is_unbounded_array(_Tp);
3944 template<
typename _Tp>
3945 inline constexpr bool is_unbounded_array_v =
false;
3947 template<
typename _Tp>
3948 inline constexpr bool is_unbounded_array_v<_Tp[]> =
true;
3953 template<
typename _Tp>
3954 struct is_bounded_array
3955 :
public bool_constant<is_bounded_array_v<_Tp>>
3960 template<
typename _Tp>
3961 struct is_unbounded_array
3962 :
public bool_constant<is_unbounded_array_v<_Tp>>
3966#if __has_builtin(__is_layout_compatible) && __cplusplus >= 202002L
3969 template<
typename _Tp,
typename _Up>
3971 : bool_constant<__is_layout_compatible(_Tp, _Up)>
3976 template<
typename _Tp,
typename _Up>
3978 = __is_layout_compatible(_Tp, _Up);
3980#if __has_builtin(__builtin_is_corresponding_member)
3981# ifndef __cpp_lib_is_layout_compatible
3982# error "libstdc++ bug: is_corresponding_member and is_layout_compatible are provided but their FTM is not set"
3986 template<
typename _S1,
typename _S2,
typename _M1,
typename _M2>
3989 {
return __builtin_is_corresponding_member(__m1, __m2); }
3993#if __has_builtin(__is_pointer_interconvertible_base_of) \
3994 && __cplusplus >= 202002L
3997 template<
typename _Base,
typename _Derived>
3999 : bool_constant<__is_pointer_interconvertible_base_of(_Base, _Derived)>
4004 template<
typename _Base,
typename _Derived>
4006 = __is_pointer_interconvertible_base_of(_Base, _Derived);
4008#if __has_builtin(__builtin_is_pointer_interconvertible_with_class)
4009# ifndef __cpp_lib_is_pointer_interconvertible
4010# error "libstdc++ bug: is_pointer_interconvertible available but FTM is not set"
4016 template<
typename _Tp,
typename _Mem>
4019 {
return __builtin_is_pointer_interconvertible_with_class(__mp); }
4023#ifdef __cpp_lib_is_scoped_enum
4027# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_scoped_enum)
4028 template<
typename _Tp>
4029 struct is_scoped_enum
4030 : bool_constant<__is_scoped_enum(_Tp)>
4033 template<
typename _Tp>
4034 struct is_scoped_enum
4038 template<
typename _Tp>
4039 requires __is_enum(_Tp)
4040 &&
requires(remove_cv_t<_Tp> __t) { __t = __t; }
4041 struct is_scoped_enum<_Tp>
4042 : bool_constant<!requires(_Tp __t, void(*__f)(int)) { __f(__t); }>
4048# if _GLIBCXX_USE_BUILTIN_TRAIT(__is_scoped_enum)
4049 template<
typename _Tp>
4050 inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp);
4052 template<
typename _Tp>
4053 inline constexpr bool is_scoped_enum_v = is_scoped_enum<_Tp>::value;
4057#ifdef __cpp_lib_is_implicit_lifetime
4061 template<
typename _Tp>
4062 struct is_implicit_lifetime
4063 : bool_constant<__builtin_is_implicit_lifetime(_Tp)>
4068 template<
typename _Tp>
4069 inline constexpr bool is_implicit_lifetime_v
4070 = __builtin_is_implicit_lifetime(_Tp);
4073#ifdef __cpp_lib_reference_from_temporary
4078 template<typename _Tp, typename _Up>
4079 struct reference_constructs_from_temporary
4080 :
public bool_constant<__reference_constructs_from_temporary(_Tp, _Up)>
4082 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{})
4083 && std::__is_complete_or_unbounded(__type_identity<_Up>{}),
4084 "template argument must be a complete class or an unbounded array");
4091 template<
typename _Tp,
typename _Up>
4092 struct reference_converts_from_temporary
4093 :
public bool_constant<__reference_converts_from_temporary(_Tp, _Up)>
4095 static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{})
4096 && std::__is_complete_or_unbounded(__type_identity<_Up>{}),
4097 "template argument must be a complete class or an unbounded array");
4102 template<
typename _Tp,
typename _Up>
4103 inline constexpr bool reference_constructs_from_temporary_v
4104 = reference_constructs_from_temporary<_Tp, _Up>::value;
4108 template<
typename _Tp,
typename _Up>
4109 inline constexpr bool reference_converts_from_temporary_v
4110 = reference_converts_from_temporary<_Tp, _Up>::value;
4113#ifdef __cpp_lib_is_constant_evaluated
4116 [[__gnu__::__always_inline__]]
4118 is_constant_evaluated() noexcept
4120#if __cpp_if_consteval >= 202106L
4121 if consteval {
return true; }
else {
return false; }
4123 return __builtin_is_constant_evaluated();
4128#if __cplusplus >= 202002L
4130 template<
typename _From,
typename _To>
4131 using __copy_cv =
typename __match_cv_qualifiers<_From, _To>::__type;
4133 template<
typename _Xp,
typename _Yp>
4137 template<
typename _Ap,
typename _Bp,
typename =
void>
4138 struct __common_ref_impl
4142 template<
typename _Ap,
typename _Bp>
4143 using __common_ref =
typename __common_ref_impl<_Ap, _Bp>::type;
4146 template<
typename _Xp,
typename _Yp>
4147 using __condres_cvref
4148 = __cond_res<__copy_cv<_Xp, _Yp>&, __copy_cv<_Yp, _Xp>&>;
4151 template<
typename _Xp,
typename _Yp>
4152 struct __common_ref_impl<_Xp&, _Yp&, __void_t<__condres_cvref<_Xp, _Yp>>>
4154 __condres_cvref<_Xp, _Yp>>
4158 template<
typename _Xp,
typename _Yp>
4162 template<
typename _Xp,
typename _Yp>
4163 struct __common_ref_impl<_Xp&&, _Yp&&,
4164 _Require<is_convertible<_Xp&&, __common_ref_C<_Xp, _Yp>>,
4165 is_convertible<_Yp&&, __common_ref_C<_Xp, _Yp>>>>
4166 {
using type = __common_ref_C<_Xp, _Yp>; };
4169 template<
typename _Xp,
typename _Yp>
4170 using __common_ref_D = __common_ref<const _Xp&, _Yp&>;
4173 template<
typename _Xp,
typename _Yp>
4174 struct __common_ref_impl<_Xp&&, _Yp&,
4175 _Require<is_convertible<_Xp&&, __common_ref_D<_Xp, _Yp>>>>
4176 {
using type = __common_ref_D<_Xp, _Yp>; };
4179 template<
typename _Xp,
typename _Yp>
4180 struct __common_ref_impl<_Xp&, _Yp&&>
4181 : __common_ref_impl<_Yp&&, _Xp&>
4185 template<
typename _Tp,
typename _Up,
4186 template<
typename>
class _TQual,
template<
typename>
class _UQual>
4187 struct basic_common_reference
4191 template<
typename _Tp>
4193 {
template<
typename _Up>
using __type = __copy_cv<_Tp, _Up>; };
4195 template<
typename _Tp>
4197 {
template<
typename _Up>
using __type = __copy_cv<_Tp, _Up>&; };
4199 template<
typename _Tp>
4200 struct __xref<_Tp&&>
4201 {
template<
typename _Up>
using __type = __copy_cv<_Tp, _Up>&&; };
4203 template<
typename _Tp1,
typename _Tp2>
4204 using __basic_common_ref
4205 =
typename basic_common_reference<remove_cvref_t<_Tp1>,
4206 remove_cvref_t<_Tp2>,
4207 __xref<_Tp1>::template __type,
4208 __xref<_Tp2>::template __type>::type;
4211 template<
typename... _Tp>
4212 struct common_reference;
4214 template<
typename... _Tp>
4219 struct common_reference<>
4223 template<
typename _Tp0>
4224 struct common_reference<_Tp0>
4225 {
using type = _Tp0; };
4228 template<
typename _Tp1,
typename _Tp2,
int _Bullet = 1,
typename =
void>
4229 struct __common_reference_impl
4230 : __common_reference_impl<_Tp1, _Tp2, _Bullet + 1>
4234 template<
typename _Tp1,
typename _Tp2>
4235 struct common_reference<_Tp1, _Tp2>
4236 : __common_reference_impl<_Tp1, _Tp2>
4240 template<
typename _Tp1,
typename _Tp2>
4241 struct __common_reference_impl<_Tp1&, _Tp2&, 1,
4242 void_t<__common_ref<_Tp1&, _Tp2&>>>
4243 {
using type = __common_ref<_Tp1&, _Tp2&>; };
4245 template<
typename _Tp1,
typename _Tp2>
4246 struct __common_reference_impl<_Tp1&&, _Tp2&&, 1,
4247 void_t<__common_ref<_Tp1&&, _Tp2&&>>>
4248 {
using type = __common_ref<_Tp1&&, _Tp2&&>; };
4250 template<
typename _Tp1,
typename _Tp2>
4251 struct __common_reference_impl<_Tp1&, _Tp2&&, 1,
4252 void_t<__common_ref<_Tp1&, _Tp2&&>>>
4253 {
using type = __common_ref<_Tp1&, _Tp2&&>; };
4255 template<
typename _Tp1,
typename _Tp2>
4256 struct __common_reference_impl<_Tp1&&, _Tp2&, 1,
4257 void_t<__common_ref<_Tp1&&, _Tp2&>>>
4258 {
using type = __common_ref<_Tp1&&, _Tp2&>; };
4261 template<
typename _Tp1,
typename _Tp2>
4262 struct __common_reference_impl<_Tp1, _Tp2, 2,
4263 void_t<__basic_common_ref<_Tp1, _Tp2>>>
4264 {
using type = __basic_common_ref<_Tp1, _Tp2>; };
4267 template<
typename _Tp1,
typename _Tp2>
4268 struct __common_reference_impl<_Tp1, _Tp2, 3,
4269 void_t<__cond_res<_Tp1, _Tp2>>>
4270 {
using type = __cond_res<_Tp1, _Tp2>; };
4273 template<
typename _Tp1,
typename _Tp2>
4274 struct __common_reference_impl<_Tp1, _Tp2, 4,
4276 {
using type = common_type_t<_Tp1, _Tp2>; };
4279 template<
typename _Tp1,
typename _Tp2>
4280 struct __common_reference_impl<_Tp1, _Tp2, 5, void>
4284 template<
typename _Tp1,
typename _Tp2,
typename... _Rest>
4285 struct common_reference<_Tp1, _Tp2, _Rest...>
4286 : __common_type_fold<common_reference<_Tp1, _Tp2>,
4287 __common_type_pack<_Rest...>>
4291 template<
typename _Tp1,
typename _Tp2,
typename... _Rest>
4292 struct __common_type_fold<common_reference<_Tp1, _Tp2>,
4293 __common_type_pack<_Rest...>,
4295 :
public common_reference<common_reference_t<_Tp1, _Tp2>, _Rest...>
4301#if __cplusplus >= 201103L
4304 template<
size_t... _Indexes>
struct _Index_tuple { };
4307 template<
size_t _Num>
4308 struct _Build_index_tuple
4310#if __has_builtin(__make_integer_seq)
4311 template<
typename,
size_t... _Indices>
4312 using _IdxTuple = _Index_tuple<_Indices...>;
4315 using __type = __make_integer_seq<_IdxTuple, size_t, _Num>;
4318 using __type = _Index_tuple<__integer_pack(_Num)...>;
4323#ifdef __cpp_lib_constant_wrapper
4324 template<
typename _Tp>
4325 struct _CwFixedValue
4330 _CwFixedValue(__type __v) noexcept
4336 template<
typename _Tp,
size_t _Extent>
4337 struct _CwFixedValue<_Tp[_Extent]>
4339 using __type = _Tp[_Extent];
4342 _CwFixedValue(_Tp (&__arr)[_Extent]) noexcept
4343 : _CwFixedValue(__arr,
typename _Build_index_tuple<_Extent>::__type())
4346 template<
size_t... _Indices>
4348 _CwFixedValue(_Tp (&__arr)[_Extent], _Index_tuple<_Indices...>) noexcept
4349 : _M_data{__arr[_Indices]...}
4352 _Tp _M_data[_Extent];
4355 template<
typename _Tp,
size_t _Extent>
4356 _CwFixedValue(_Tp (&)[_Extent]) -> _CwFixedValue<_Tp[_Extent]>;
4358 template<_CwFixedValue _Xv,
4359 typename =
typename decltype(_CwFixedValue(_Xv))::__type>
4360 struct constant_wrapper;
4362 template<
typename _Tp>
4363 concept _ConstExprParam =
requires
4365 typename constant_wrapper<_Tp::value>;
4370 template<_ConstExprParam _Tp>
4371 friend constexpr auto
4372 operator+(_Tp)
noexcept -> constant_wrapper<(+_Tp::value)>
4375 template<_ConstExprParam _Tp>
4376 friend constexpr auto
4377 operator-(_Tp)
noexcept -> constant_wrapper<(-_Tp::value)>
4380 template<_ConstExprParam _Tp>
4381 friend constexpr auto
4382 operator~(_Tp)
noexcept -> constant_wrapper<(~_Tp::value)>
4385 template<_ConstExprParam _Tp>
4386 friend constexpr auto
4387 operator!(_Tp)
noexcept -> constant_wrapper<(!_Tp::value)>
4390 template<_ConstExprParam _Tp>
4391 friend constexpr auto
4392 operator&(_Tp)
noexcept -> constant_wrapper<(&_Tp::value)>
4395 template<_ConstExprParam _Tp>
4396 friend constexpr auto
4397 operator*(_Tp)
noexcept -> constant_wrapper<(*_Tp::value)>
4400 template<_ConstExprParam _Left, _ConstExprParam _Right>
4401 friend constexpr auto
4403 -> constant_wrapper<(_Left::value + _Right::value)>
4406 template<_ConstExprParam _Left, _ConstExprParam _Right>
4407 friend constexpr auto
4409 -> constant_wrapper<(_Left::value - _Right::value)>
4412 template<_ConstExprParam _Left, _ConstExprParam _Right>
4413 friend constexpr auto
4415 -> constant_wrapper<(_Left::value * _Right::value)>
4418 template<_ConstExprParam _Left, _ConstExprParam _Right>
4419 friend constexpr auto
4421 -> constant_wrapper<(_Left::value / _Right::value)>
4424 template<_ConstExprParam _Left, _ConstExprParam _Right>
4425 friend constexpr auto
4426 operator%(_Left, _Right)
noexcept
4427 -> constant_wrapper<(_Left::value % _Right::value)>
4430 template<_ConstExprParam _Left, _ConstExprParam _Right>
4431 friend constexpr auto
4433 -> constant_wrapper<(_Left::value << _Right::value)>
4436 template<_ConstExprParam _Left, _ConstExprParam _Right>
4437 friend constexpr auto
4439 -> constant_wrapper<(_Left::value >> _Right::value)>
4442 template<_ConstExprParam _Left, _ConstExprParam _Right>
4443 friend constexpr auto
4445 -> constant_wrapper<(_Left::value & _Right::value)>
4448 template<_ConstExprParam _Left, _ConstExprParam _Right>
4449 friend constexpr auto
4451 -> constant_wrapper<(_Left::value | _Right::value)>
4454 template<_ConstExprParam _Left, _ConstExprParam _Right>
4455 friend constexpr auto
4457 -> constant_wrapper<(_Left::value ^ _Right::value)>
4460 template<_ConstExprParam _Left, _ConstExprParam _Right>
4461 requires (!is_constructible_v<bool,
decltype(_Left::value)>
4462 || !is_constructible_v<bool,
decltype(_Right::value)>)
4463 friend constexpr auto
4464 operator&&(_Left, _Right)
noexcept
4465 -> constant_wrapper<(_Left::value && _Right::value)>
4468 template<_ConstExprParam _Left, _ConstExprParam _Right>
4469 requires (!is_constructible_v<bool,
decltype(_Left::value)>
4470 || !is_constructible_v<bool,
decltype(_Right::value)>)
4471 friend constexpr auto
4472 operator||(_Left, _Right)
noexcept
4473 -> constant_wrapper<(_Left::value || _Right::value)>
4476 template<_ConstExprParam _Left, _ConstExprParam _Right>
4477 friend constexpr auto
4478 operator<=>(_Left, _Right)
noexcept
4479 -> constant_wrapper<(_Left::value <=> _Right::value)>
4482 template<_ConstExprParam _Left, _ConstExprParam _Right>
4483 friend constexpr auto
4484 operator<(_Left, _Right)
noexcept
4485 -> constant_wrapper<(_Left::value < _Right::value)>
4488 template<_ConstExprParam _Left, _ConstExprParam _Right>
4489 friend constexpr auto
4490 operator<=(_Left, _Right)
noexcept
4491 -> constant_wrapper<(_Left::value <= _Right::value)>
4494 template<_ConstExprParam _Left, _ConstExprParam _Right>
4495 friend constexpr auto
4496 operator==(_Left, _Right)
noexcept
4497 -> constant_wrapper<(_Left::value == _Right::value)>
4500 template<_ConstExprParam _Left, _ConstExprParam _Right>
4501 friend constexpr auto
4502 operator!=(_Left, _Right)
noexcept
4503 -> constant_wrapper<(_Left::value != _Right::value)>
4506 template<_ConstExprParam _Left, _ConstExprParam _Right>
4507 friend constexpr auto
4508 operator>(_Left, _Right)
noexcept
4509 -> constant_wrapper<(_Left::value > _Right::value)>
4512 template<_ConstExprParam _Left, _ConstExprParam _Right>
4513 friend constexpr auto
4514 operator>=(_Left, _Right)
noexcept
4515 -> constant_wrapper<(_Left::value >= _Right::value)>
4518 template<_ConstExprParam _Left, _ConstExprParam _Right>
4519 friend constexpr auto
4520 operator,(_Left, _Right)
noexcept =
delete;
4522 template<_ConstExprParam _Left, _ConstExprParam _Right>
4523 friend constexpr auto
4524 operator->*(_Left, _Right)
noexcept
4525 -> constant_wrapper<_Left::value->*(_Right::value)>
4528 template<_ConstExprParam _Tp, _ConstExprParam... _Args>
4530 operator()(
this _Tp, _Args...) noexcept
4532 requires(_Args...) { constant_wrapper<_Tp::value(_Args::value...)>(); }
4533 {
return constant_wrapper<_Tp::value(_Args::value...)>{}; }
4535 template<_ConstExprParam _Tp, _ConstExprParam... _Args>
4537 operator[](
this _Tp, _Args...) noexcept
4538 -> constant_wrapper<(_Tp::value[_Args::value...])>
4541 template<_ConstExprParam _Tp>
4543 operator++(
this _Tp)
noexcept
4544 requires requires(_Tp::value_type __x) { ++__x; }
4546 return constant_wrapper<
4547 [] {
auto __x = _Tp::value;
return ++__x; }()>{};
4550 template<_ConstExprParam _Tp>
4552 operator++(
this _Tp,
int)
noexcept
4553 requires requires(_Tp::value_type __x) { __x++; }
4555 return constant_wrapper<
4556 [] {
auto __x = _Tp::value;
return __x++; }()>{};
4559 template<_ConstExprParam _Tp>
4561 operator--(
this _Tp)
noexcept
4562 requires requires(_Tp::value_type __x) { --__x; }
4564 return constant_wrapper<
4565 [] {
auto __x = _Tp::value;
return --__x; }()>{};
4568 template<_ConstExprParam _Tp>
4570 operator--(
this _Tp,
int)
noexcept
4571 requires requires(_Tp::value_type __x) { __x--; }
4573 return constant_wrapper<
4574 [] {
auto __x = _Tp::value;
return __x--; }()>{};
4577 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4579 operator+=(
this _Tp, _Right)
noexcept
4580 requires requires(_Tp::value_type __x) { __x += _Right::value; }
4582 return constant_wrapper<
4583 [] {
auto __x = _Tp::value;
return __x += _Right::value; }()>{};
4586 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4588 operator-=(
this _Tp, _Right)
noexcept
4589 requires requires(_Tp::value_type __x) { __x -= _Right::value; }
4591 return constant_wrapper<
4592 [] {
auto __x = _Tp::value;
return __x -= _Right::value; }()>{};
4595 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4597 operator*=(
this _Tp, _Right)
noexcept
4598 requires requires(_Tp::value_type __x) { __x *= _Right::value; }
4600 return constant_wrapper<
4601 [] {
auto __x = _Tp::value;
return __x *= _Right::value; }()>{};
4604 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4606 operator/=(
this _Tp, _Right)
noexcept
4607 requires requires(_Tp::value_type __x) { __x /= _Right::value; }
4609 return constant_wrapper<
4610 [] {
auto __x = _Tp::value;
return __x /= _Right::value; }()>{};
4613 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4615 operator%=(
this _Tp, _Right)
noexcept
4616 requires requires(_Tp::value_type __x) { __x %= _Right::value; }
4618 return constant_wrapper<
4619 [] {
auto __x = _Tp::value;
return __x %= _Right::value; }()>{};
4622 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4624 operator&=(
this _Tp, _Right)
noexcept
4625 requires requires(_Tp::value_type __x) { __x &= _Right::value; }
4627 return constant_wrapper<
4628 [] {
auto __x = _Tp::value;
return __x &= _Right::value; }()>{};
4631 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4633 operator|=(
this _Tp, _Right)
noexcept
4634 requires requires(_Tp::value_type __x) { __x |= _Right::value; }
4636 return constant_wrapper<
4637 [] {
auto __x = _Tp::value;
return __x |= _Right::value; }()>{};
4640 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4642 operator^=(
this _Tp, _Right)
noexcept
4643 requires requires(_Tp::value_type __x) { __x ^= _Right::value; }
4645 return constant_wrapper<
4646 [] {
auto __x = _Tp::value;
return __x ^= _Right::value; }()>{};
4649 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4651 operator<<=(
this _Tp, _Right)
noexcept
4652 requires requires(_Tp::value_type __x) { __x <<= _Right::value; }
4654 return constant_wrapper<
4655 [] {
auto __x = _Tp::value;
return __x <<= _Right::value; }()>{};
4658 template<_ConstExprParam _Tp, _ConstExprParam _Right>
4660 operator>>=(
this _Tp, _Right)
noexcept
4661 requires requires(_Tp::value_type __x) { __x >>= _Right::value; }
4663 return constant_wrapper<
4664 [] {
auto __x = _Tp::value;
return __x >>= _Right::value; }()>{};
4668 template<_CwFixedValue _Xv,
typename>
4669 struct constant_wrapper : _CwOperators
4671 static constexpr const auto& value = _Xv._M_data;
4672 using type = constant_wrapper;
4673 using value_type =
typename decltype(_Xv)::__type;
4675 template<_ConstExprParam _Right>
4677 operator=(_Right)
const noexcept
4678 requires requires(value_type __x) { __x = _Right::value; }
4680 return constant_wrapper<
4681 [] {
auto __x = value;
return __x = _Right::value; }()>{};
4685 operator decltype(
auto)()
const noexcept
4689 template<_CwFixedValue _Tp>
4690 constexpr auto cw = constant_wrapper<_Tp>{};
4695_GLIBCXX_END_NAMESPACE_VERSION
constexpr complex< _Tp > operator*(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x times y.
constexpr complex< _Tp > operator-(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x minus y.
constexpr complex< _Tp > operator+(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x plus y.
constexpr complex< _Tp > operator/(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x divided by y.
static const size_t alignment_value
The value of the strictest alignment of _Types.
constexpr bool is_corresponding_member(_M1 _S1::*__m1, _M2 _S2::*__m2) noexcept
typename common_reference< _Tp... >::type common_reference_t
typename result_of< _Tp >::type result_of_t
Alias template for result_of.
typename aligned_storage< _S_len, alignment_value >::type type
The storage.
__bool_constant< true > true_type
The type used as a compile-time boolean with true value.
typename remove_extent< _Tp >::type remove_extent_t
Alias template for remove_extent.
typename conditional< _Cond, _Iftrue, _Iffalse >::type conditional_t
Alias template for conditional.
typename underlying_type< _Tp >::type underlying_type_t
Alias template for underlying_type.
typename make_signed< _Tp >::type make_signed_t
Alias template for make_signed.
typename add_lvalue_reference< _Tp >::type add_lvalue_reference_t
Alias template for add_lvalue_reference.
typename aligned_storage< _Len, _Align >::type aligned_storage_t
Alias template for aligned_storage.
typename remove_reference< _Tp >::type remove_reference_t
Alias template for remove_reference.
typename common_type< _Tp... >::type common_type_t
Alias template for common_type.
typename add_pointer< _Tp >::type add_pointer_t
Alias template for add_pointer.
typename make_unsigned< _Tp >::type make_unsigned_t
Alias template for make_unsigned.
constexpr bool is_pointer_interconvertible_with_class(_Mem _Tp::*__mp) noexcept
True if __mp points to the first member of a standard-layout type.
typename enable_if< _Cond, _Tp >::type enable_if_t
Alias template for enable_if.
typename remove_all_extents< _Tp >::type remove_all_extents_t
Alias template for remove_all_extents.
typename remove_pointer< _Tp >::type remove_pointer_t
Alias template for remove_pointer.
typename add_rvalue_reference< _Tp >::type add_rvalue_reference_t
Alias template for add_rvalue_reference.
__bool_constant< false > false_type
The type used as a compile-time boolean with false value.
constexpr bool is_layout_compatible_v
constexpr bool is_pointer_interconvertible_base_of_v
typename decay< _Tp >::type decay_t
Alias template for decay.
auto declval() noexcept -> decltype(__declval< _Tp >(0))
void void_t
A metafunction that always yields void, used for detecting valid types.
ISO C++ entities toplevel namespace is std.
constexpr bitset< _Nb > operator^(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.
std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, bitset< _Nb > &__x)
Global I/O operators for bitsets.
std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const bitset< _Nb > &__x)
Global I/O operators for bitsets.
constexpr bitset< _Nb > operator|(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.
constexpr bitset< _Nb > operator&(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.
Implementation details not part of the namespace std interface.
Primary class template for reference_wrapper.
Define a member typedef type only if a boolean constant is true.
is_member_function_pointer
is_nothrow_default_constructible
is_nothrow_copy_constructible
is_nothrow_move_constructible
is_nothrow_copy_assignable
is_nothrow_move_assignable
is_trivially_constructible
is_trivially_default_constructible
is_trivially_copy_constructible
is_trivially_move_constructible
is_trivially_copy_assignable
is_trivially_move_assignable
is_trivially_destructible
Provide aligned storage for types.
Define a member typedef type to one of two argument types.
The underlying type of an enum.
True if _Derived is standard-layout and has a base class of type _Base