29 #ifndef _GLIBCXX_TYPE_TRAITS
30 #define _GLIBCXX_TYPE_TRAITS 1
32 #pragma GCC system_header
34 #if __cplusplus < 201103L
40 namespace std _GLIBCXX_VISIBILITY(default)
42 _GLIBCXX_BEGIN_NAMESPACE_VERSION
56 template<
typename _Tp, _Tp __v>
59 static constexpr _Tp value = __v;
60 typedef _Tp value_type;
62 constexpr
operator value_type()
const noexcept {
return value; }
63 #if __cplusplus > 201103L
65 #define __cpp_lib_integral_constant_callable 201304
67 constexpr value_type operator()()
const noexcept {
return value; }
71 template<
typename _Tp, _Tp __v>
83 #if __cplusplus > 201402L
84 # define __cpp_lib_bool_constant 201505
91 template<
bool,
typename,
typename>
102 template<
typename _B1>
107 template<
typename _B1,
typename _B2>
108 struct __or_<_B1, _B2>
109 :
public conditional<_B1::value, _B1, _B2>::type
112 template<
typename _B1,
typename _B2,
typename _B3,
typename... _Bn>
113 struct __or_<_B1, _B2, _B3, _Bn...>
114 :
public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type
117 template<
typename...>
125 template<
typename _B1>
130 template<
typename _B1,
typename _B2>
131 struct __and_<_B1, _B2>
132 :
public conditional<_B1::value, _B2, _B1>::type
135 template<
typename _B1,
typename _B2,
typename _B3,
typename... _Bn>
136 struct __and_<_B1, _B2, _B3, _Bn...>
137 :
public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type
140 template<
typename _Pp>
142 :
public __bool_constant<!bool(_Pp::value)>
145 #if __cplusplus >= 201703L
147 template<
typename... _Bn>
148 inline constexpr
bool __or_v = __or_<_Bn...>::value;
149 template<
typename... _Bn>
150 inline constexpr
bool __and_v = __and_<_Bn...>::value;
152 #define __cpp_lib_logical_traits 201510
154 template<
typename... _Bn>
159 template<
typename... _Bn>
164 template<
typename _Pp>
169 template<
typename... _Bn>
170 inline constexpr
bool conjunction_v = conjunction<_Bn...>::value;
172 template<
typename... _Bn>
173 inline constexpr
bool disjunction_v = disjunction<_Bn...>::value;
175 template<
typename _Pp>
176 inline constexpr
bool negation_v = negation<_Pp>::value;
185 template<
typename _Tp>
186 struct __success_type
187 {
typedef _Tp type; };
189 struct __failure_type
198 struct __is_void_helper
202 struct __is_void_helper<void>
206 template<
typename _Tp>
208 :
public __is_void_helper<typename remove_cv<_Tp>::type>
::type
212 struct __is_integral_helper
216 struct __is_integral_helper<bool>
220 struct __is_integral_helper<char>
224 struct __is_integral_helper<signed char>
228 struct __is_integral_helper<unsigned char>
231 #ifdef _GLIBCXX_USE_WCHAR_T
233 struct __is_integral_helper<wchar_t>
237 #ifdef _GLIBCXX_USE_CHAR8_T
239 struct __is_integral_helper<char8_t>
244 struct __is_integral_helper<char16_t>
248 struct __is_integral_helper<char32_t>
252 struct __is_integral_helper<short>
256 struct __is_integral_helper<unsigned short>
260 struct __is_integral_helper<int>
264 struct __is_integral_helper<unsigned int>
268 struct __is_integral_helper<long>
272 struct __is_integral_helper<unsigned long>
276 struct __is_integral_helper<long long>
280 struct __is_integral_helper<unsigned long long>
285 #if defined(__GLIBCXX_TYPE_INT_N_0)
287 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_0>
291 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_0>
294 #if defined(__GLIBCXX_TYPE_INT_N_1)
296 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_1>
300 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_1>
303 #if defined(__GLIBCXX_TYPE_INT_N_2)
305 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_2>
309 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_2>
312 #if defined(__GLIBCXX_TYPE_INT_N_3)
314 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_3>
318 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_3>
323 template<
typename _Tp>
325 :
public __is_integral_helper<typename remove_cv<_Tp>::type>
::type
329 struct __is_floating_point_helper
333 struct __is_floating_point_helper<float>
337 struct __is_floating_point_helper<double>
341 struct __is_floating_point_helper<long double>
344 #if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && !defined(__CUDACC__)
346 struct __is_floating_point_helper<__float128>
351 template<
typename _Tp>
353 :
public __is_floating_point_helper<typename remove_cv<_Tp>::type>::type
361 template<
typename _Tp, std::
size_t _Size>
365 template<
typename _Tp>
366 struct is_array<_Tp[]>
370 struct __is_pointer_helper
373 template<
typename _Tp>
374 struct __is_pointer_helper<_Tp*>
378 template<
typename _Tp>
380 :
public __is_pointer_helper<typename remove_cv<_Tp>::type>::type
388 template<
typename _Tp>
397 template<
typename _Tp>
405 struct __is_member_object_pointer_helper
408 template<
typename _Tp,
typename _Cp>
409 struct __is_member_object_pointer_helper<_Tp _Cp::*>
410 :
public __not_<is_function<_Tp>>::type { };
413 template<
typename _Tp>
415 :
public __is_member_object_pointer_helper<
416 typename remove_cv<_Tp>::type>::type
420 struct __is_member_function_pointer_helper
423 template<
typename _Tp,
typename _Cp>
424 struct __is_member_function_pointer_helper<_Tp _Cp::*>
425 :
public is_function<_Tp>::type { };
428 template<
typename _Tp>
430 :
public __is_member_function_pointer_helper<
431 typename remove_cv<_Tp>::type>
::type
435 template<
typename _Tp>
441 template<
typename _Tp>
447 template<
typename _Tp>
457 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
458 struct is_function<_Res(_ArgTypes...) _GLIBCXX_NOEXCEPT_QUAL>
461 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
462 struct is_function<_Res(_ArgTypes...) & _GLIBCXX_NOEXCEPT_QUAL>
465 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
466 struct is_function<_Res(_ArgTypes...) && _GLIBCXX_NOEXCEPT_QUAL>
469 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
470 struct is_function<_Res(_ArgTypes......) _GLIBCXX_NOEXCEPT_QUAL>
473 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
474 struct is_function<_Res(_ArgTypes......) & _GLIBCXX_NOEXCEPT_QUAL>
477 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
478 struct is_function<_Res(_ArgTypes......) && _GLIBCXX_NOEXCEPT_QUAL>
481 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
482 struct is_function<_Res(_ArgTypes...) const _GLIBCXX_NOEXCEPT_QUAL>
485 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
486 struct is_function<_Res(_ArgTypes...) const & _GLIBCXX_NOEXCEPT_QUAL>
489 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
490 struct is_function<_Res(_ArgTypes...) const && _GLIBCXX_NOEXCEPT_QUAL>
493 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
494 struct is_function<_Res(_ArgTypes......) const _GLIBCXX_NOEXCEPT_QUAL>
497 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
498 struct is_function<_Res(_ArgTypes......) const & _GLIBCXX_NOEXCEPT_QUAL>
501 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
502 struct is_function<_Res(_ArgTypes......) const && _GLIBCXX_NOEXCEPT_QUAL>
505 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
506 struct is_function<_Res(_ArgTypes...) volatile _GLIBCXX_NOEXCEPT_QUAL>
509 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
510 struct is_function<_Res(_ArgTypes...) volatile & _GLIBCXX_NOEXCEPT_QUAL>
513 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
514 struct is_function<_Res(_ArgTypes...) volatile && _GLIBCXX_NOEXCEPT_QUAL>
517 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
518 struct is_function<_Res(_ArgTypes......) volatile _GLIBCXX_NOEXCEPT_QUAL>
521 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
522 struct is_function<_Res(_ArgTypes......) volatile & _GLIBCXX_NOEXCEPT_QUAL>
525 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
526 struct is_function<_Res(_ArgTypes......) volatile && _GLIBCXX_NOEXCEPT_QUAL>
529 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
530 struct is_function<_Res(_ArgTypes...) const volatile _GLIBCXX_NOEXCEPT_QUAL>
533 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
534 struct is_function<_Res(_ArgTypes...) const volatile & _GLIBCXX_NOEXCEPT_QUAL>
537 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
538 struct is_function<_Res(_ArgTypes...) const volatile && _GLIBCXX_NOEXCEPT_QUAL>
541 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
542 struct is_function<_Res(_ArgTypes......) const volatile _GLIBCXX_NOEXCEPT_QUAL>
545 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
546 struct is_function<_Res(_ArgTypes......) const volatile & _GLIBCXX_NOEXCEPT_QUAL>
549 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
550 struct is_function<_Res(_ArgTypes......) const volatile && _GLIBCXX_NOEXCEPT_QUAL>
553 #define __cpp_lib_is_null_pointer 201309
556 struct __is_null_pointer_helper
560 struct __is_null_pointer_helper<std::nullptr_t>
564 template<
typename _Tp>
566 :
public __is_null_pointer_helper<typename remove_cv<_Tp>::type>::type
570 template<
typename _Tp>
578 template<
typename _Tp>
580 :
public __or_<is_lvalue_reference<_Tp>,
581 is_rvalue_reference<_Tp>>::type
585 template<
typename _Tp>
587 :
public __or_<is_integral<_Tp>, is_floating_point<_Tp>>::type
591 template<
typename _Tp>
593 :
public __or_<is_arithmetic<_Tp>, is_void<_Tp>,
594 is_null_pointer<_Tp>>::type
598 template<
typename _Tp>
600 :
public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
608 template<
typename _Tp>
610 :
public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
611 is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type
615 template<
typename _Tp>
617 :
public __not_<is_fundamental<_Tp>>
::type { };
619 template<
typename _Tp>
620 struct __is_member_pointer_helper
623 template<
typename _Tp,
typename _Cp>
624 struct __is_member_pointer_helper<_Tp _Cp::*>
628 template<
typename _Tp>
629 struct is_member_pointer
630 :
public __is_member_pointer_helper<typename remove_cv<_Tp>::type>::type
635 template<
typename _Tp>
636 struct __is_referenceable
637 :
public __or_<is_object<_Tp>, is_reference<_Tp>>::type
640 template<
typename _Res,
typename... _Args _GLIBCXX_NOEXCEPT_PARM>
641 struct __is_referenceable<_Res(_Args...) _GLIBCXX_NOEXCEPT_QUAL>
645 template<
typename _Res,
typename... _Args _GLIBCXX_NOEXCEPT_PARM>
646 struct __is_referenceable<_Res(_Args......) _GLIBCXX_NOEXCEPT_QUAL>
657 template<
typename _Tp>
666 template<
typename _Tp>
671 template<
typename _Tp>
677 template<
typename _Tp>
678 struct is_trivially_copyable
683 template<
typename _Tp>
690 template<
typename _Tp>
696 template<
typename _Tp>
702 template<
typename _Tp>
708 template<
typename _Tp>
713 #if __cplusplus >= 201402L
714 #define __cpp_lib_is_final 201402L
716 template<
typename _Tp>
723 template<
typename _Tp>
728 template<
typename _Tp,
730 struct __is_signed_helper
733 template<
typename _Tp>
734 struct __is_signed_helper<_Tp, true>
735 :
public integral_constant<bool, _Tp(-1) < _Tp(0)>
739 template<typename _Tp>
741 : public __is_signed_helper<_Tp>::type
745 template<typename _Tp>
747 : public __and_<is_arithmetic<_Tp>, __not_<is_signed<_Tp>>>
758 template<typename _Tp, typename _Up = _Tp&&>
762 template<typename _Tp>
766 template<typename _Tp>
767 auto declval() noexcept -> decltype(__declval<_Tp>(0));
769 template<typename, unsigned = 0>
775 template<typename _Tp>
776 struct __is_array_known_bounds
780 template<
typename _Tp>
781 struct __is_array_unknown_bounds
782 :
public __and_<is_array<_Tp>, __not_<extent<_Tp>>>
790 struct __do_is_destructible_impl
792 template<
typename _Tp,
typename = decltype(declval<_Tp&>().~_Tp())>
799 template<
typename _Tp>
800 struct __is_destructible_impl
801 :
public __do_is_destructible_impl
803 typedef decltype(__test<_Tp>(0)) type;
806 template<typename _Tp,
807 bool = __or_<is_void<_Tp>,
808 __is_array_unknown_bounds<_Tp>,
809 is_function<_Tp>>::value,
810 bool = __or_<is_reference<_Tp>, is_scalar<_Tp>>::value>
811 struct __is_destructible_safe;
813 template<typename _Tp>
814 struct __is_destructible_safe<_Tp, false, false>
815 : public __is_destructible_impl<typename
816 remove_all_extents<_Tp>::type>::type
819 template<
typename _Tp>
820 struct __is_destructible_safe<_Tp, true, false>
823 template<
typename _Tp>
824 struct __is_destructible_safe<_Tp, false, true>
828 template<
typename _Tp>
830 :
public __is_destructible_safe<_Tp>::type
837 struct __do_is_nt_destructible_impl
839 template<
typename _Tp>
847 template<
typename _Tp>
848 struct __is_nt_destructible_impl
849 :
public __do_is_nt_destructible_impl
851 typedef decltype(__test<_Tp>(0)) type;
854 template<typename _Tp,
855 bool = __or_<is_void<_Tp>,
856 __is_array_unknown_bounds<_Tp>,
857 is_function<_Tp>>::value,
858 bool = __or_<is_reference<_Tp>, is_scalar<_Tp>>::value>
859 struct __is_nt_destructible_safe;
861 template<typename _Tp>
862 struct __is_nt_destructible_safe<_Tp, false, false>
863 : public __is_nt_destructible_impl<typename
864 remove_all_extents<_Tp>::type>::type
867 template<
typename _Tp>
868 struct __is_nt_destructible_safe<_Tp, true, false>
871 template<
typename _Tp>
872 struct __is_nt_destructible_safe<_Tp, false, true>
876 template<
typename _Tp>
878 :
public __is_nt_destructible_safe<_Tp>::type
882 template<
typename _Tp,
typename... _Args>
888 template<
typename _Tp>
893 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
894 struct __is_copy_constructible_impl;
896 template<
typename _Tp>
897 struct __is_copy_constructible_impl<_Tp, false>
900 template<
typename _Tp>
901 struct __is_copy_constructible_impl<_Tp, true>
902 :
public is_constructible<_Tp, const _Tp&>
906 template<
typename _Tp>
908 :
public __is_copy_constructible_impl<_Tp>
911 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
912 struct __is_move_constructible_impl;
914 template<
typename _Tp>
915 struct __is_move_constructible_impl<_Tp, false>
918 template<
typename _Tp>
919 struct __is_move_constructible_impl<_Tp, true>
920 :
public is_constructible<_Tp, _Tp&&>
924 template<
typename _Tp>
926 :
public __is_move_constructible_impl<_Tp>
929 template<bool,
typename _Tp,
typename... _Args>
930 struct __is_nt_constructible_impl
934 template<
typename _Tp,
typename... _Args>
935 struct __is_nt_constructible_impl<true, _Tp, _Args...>
936 :
public __bool_constant<noexcept(_Tp(std::declval<_Args>()...))>
939 template<
typename _Tp,
typename _Arg>
940 struct __is_nt_constructible_impl<true, _Tp, _Arg>
941 :
public __bool_constant<noexcept(static_cast<_Tp>(std::declval<_Arg>()))>
944 template<
typename _Tp>
945 struct __is_nt_constructible_impl<true, _Tp>
946 :
public __bool_constant<noexcept(_Tp())>
949 template<
typename _Tp,
size_t _Num>
950 struct __is_nt_constructible_impl<true, _Tp[_Num]>
951 :
public __bool_constant<noexcept(typename remove_all_extents<_Tp>::type())>
954 template<
typename _Tp,
typename... _Args>
955 using __is_nothrow_constructible_impl
956 = __is_nt_constructible_impl<__is_constructible(_Tp, _Args...),
960 template<
typename _Tp,
typename... _Args>
962 :
public __is_nothrow_constructible_impl<_Tp, _Args...>
::type
966 template<
typename _Tp>
968 :
public __is_nothrow_constructible_impl<_Tp>
::type
972 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
973 struct __is_nothrow_copy_constructible_impl;
975 template<
typename _Tp>
976 struct __is_nothrow_copy_constructible_impl<_Tp, false>
979 template<
typename _Tp>
980 struct __is_nothrow_copy_constructible_impl<_Tp, true>
981 :
public is_nothrow_constructible<_Tp, const _Tp&>
985 template<
typename _Tp>
987 :
public __is_nothrow_copy_constructible_impl<_Tp>
990 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
991 struct __is_nothrow_move_constructible_impl;
993 template<
typename _Tp>
994 struct __is_nothrow_move_constructible_impl<_Tp, false>
997 template<
typename _Tp>
998 struct __is_nothrow_move_constructible_impl<_Tp, true>
999 :
public is_nothrow_constructible<_Tp, _Tp&&>
1003 template<
typename _Tp>
1005 :
public __is_nothrow_move_constructible_impl<_Tp>
1009 template<
typename _Tp,
typename _Up>
1014 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1015 struct __is_copy_assignable_impl;
1017 template<
typename _Tp>
1018 struct __is_copy_assignable_impl<_Tp, false>
1021 template<
typename _Tp>
1022 struct __is_copy_assignable_impl<_Tp, true>
1023 :
public is_assignable<_Tp&, const _Tp&>
1027 template<
typename _Tp>
1029 :
public __is_copy_assignable_impl<_Tp>
1032 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1033 struct __is_move_assignable_impl;
1035 template<
typename _Tp>
1036 struct __is_move_assignable_impl<_Tp, false>
1039 template<
typename _Tp>
1040 struct __is_move_assignable_impl<_Tp, true>
1041 :
public is_assignable<_Tp&, _Tp&&>
1045 template<
typename _Tp>
1047 :
public __is_move_assignable_impl<_Tp>
1050 template<
typename _Tp,
typename _Up>
1051 struct __is_nt_assignable_impl
1056 template<
typename _Tp,
typename _Up>
1058 :
public __and_<is_assignable<_Tp, _Up>,
1059 __is_nt_assignable_impl<_Tp, _Up>>
1062 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1063 struct __is_nt_copy_assignable_impl;
1065 template<
typename _Tp>
1066 struct __is_nt_copy_assignable_impl<_Tp, false>
1069 template<
typename _Tp>
1070 struct __is_nt_copy_assignable_impl<_Tp, true>
1071 :
public is_nothrow_assignable<_Tp&, const _Tp&>
1075 template<
typename _Tp>
1077 :
public __is_nt_copy_assignable_impl<_Tp>
1080 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1081 struct __is_nt_move_assignable_impl;
1083 template<
typename _Tp>
1084 struct __is_nt_move_assignable_impl<_Tp, false>
1087 template<
typename _Tp>
1088 struct __is_nt_move_assignable_impl<_Tp, true>
1089 :
public is_nothrow_assignable<_Tp&, _Tp&&>
1093 template<
typename _Tp>
1095 :
public __is_nt_move_assignable_impl<_Tp>
1099 template<
typename _Tp,
typename... _Args>
1105 template<
typename _Tp>
1110 struct __do_is_implicitly_default_constructible_impl
1112 template <
typename _Tp>
1113 static void __helper(
const _Tp&);
1115 template <
typename _Tp>
1117 decltype(__helper<const _Tp&>({}))* = 0);
1122 template<
typename _Tp>
1123 struct __is_implicitly_default_constructible_impl
1124 :
public __do_is_implicitly_default_constructible_impl
1126 typedef decltype(__test(declval<_Tp>())) type;
1129 template<typename _Tp>
1130 struct __is_implicitly_default_constructible_safe
1131 : public __is_implicitly_default_constructible_impl<_Tp>::type
1134 template <
typename _Tp>
1135 struct __is_implicitly_default_constructible
1136 :
public __and_<is_default_constructible<_Tp>,
1137 __is_implicitly_default_constructible_safe<_Tp>>
1142 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1145 template<
typename _Tp>
1149 template<
typename _Tp>
1151 :
public __and_<is_copy_constructible<_Tp>,
1152 integral_constant<bool,
1153 __is_trivially_constructible(_Tp, const _Tp&)>>
1156 template<
typename _Tp>
1157 struct is_trivially_copy_constructible
1158 :
public __is_trivially_copy_constructible_impl<_Tp>
1163 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1166 template<
typename _Tp>
1170 template<
typename _Tp>
1172 :
public __and_<is_move_constructible<_Tp>,
1173 integral_constant<bool,
1174 __is_trivially_constructible(_Tp, _Tp&&)>>
1177 template<
typename _Tp>
1178 struct is_trivially_move_constructible
1179 :
public __is_trivially_move_constructible_impl<_Tp>
1183 template<
typename _Tp,
typename _Up>
1190 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1193 template<
typename _Tp>
1197 template<
typename _Tp>
1202 template<
typename _Tp>
1203 struct is_trivially_copy_assignable
1204 :
public __is_trivially_copy_assignable_impl<_Tp>
1209 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1212 template<
typename _Tp>
1216 template<
typename _Tp>
1221 template<
typename _Tp>
1222 struct is_trivially_move_assignable
1223 :
public __is_trivially_move_assignable_impl<_Tp>
1227 template<
typename _Tp>
1229 :
public __and_<is_destructible<_Tp>,
1230 __bool_constant<__has_trivial_destructor(_Tp)>>
1235 template<
typename _Tp>
1244 template<
typename _Tp>
1253 template<
typename _Tp, std::
size_t _Size>
1254 struct rank<_Tp[_Size]>
1257 template<
typename _Tp>
1259 :
public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
1262 template<
typename,
unsigned _U
int>
1264 :
public integral_constant<std::size_t, 0> { };
1266 template<
typename _Tp,
unsigned _U
int, std::
size_t _Size>
1267 struct extent<_Tp[_Size], _Uint>
1268 :
public integral_constant<std::size_t,
1269 _Uint == 0 ? _Size : extent<_Tp,
1273 template<
typename _Tp,
unsigned _U
int>
1274 struct extent<_Tp[], _Uint>
1275 :
public integral_constant<std::size_t,
1276 _Uint == 0 ? 0 : extent<_Tp,
1284 template<
typename,
typename>
1288 template<
typename _Tp>
1293 template<
typename _Base,
typename _Derived>
1298 template<
typename _From,
typename _To,
1301 struct __is_convertible_helper
1306 template<
typename _From,
typename _To>
1307 class __is_convertible_helper<_From, _To, false>
1309 template<
typename _To1>
1310 static void __test_aux(_To1) noexcept;
1312 template<typename _From1, typename _To1,
1313 typename = decltype(__test_aux<_To1>(std::declval<_From1>()))>
1317 template<typename, typename>
1322 typedef decltype(__test<_From, _To>(0)) type;
1327 template<typename _From, typename _To>
1329 : public __is_convertible_helper<_From, _To>::type
1332 #if __cplusplus > 201703L
1333 template<
typename _From,
typename _To,
1336 struct __is_nt_convertible_helper
1340 template<
typename _From,
typename _To>
1341 class __is_nt_convertible_helper<_From, _To, false>
1343 template<
typename _To1>
1344 static void __test_aux(_To1) noexcept;
1346 template<typename _From1, typename _To1>
1347 static bool_constant<noexcept(__test_aux<_To1>(std::declval<_From1>()))>
1350 template<typename, typename>
1355 using type = decltype(__test<_From, _To>(0));
1358 #define __cpp_lib_is_nothrow_convertible 201806L
1360 template<
typename _From,
typename _To>
1361 struct is_nothrow_convertible
1362 :
public __is_nt_convertible_helper<_From, _To>::type
1366 template<
typename _From,
typename _To>
1367 inline constexpr
bool is_nothrow_convertible_v
1368 = is_nothrow_convertible<_From, _To>::value;
1374 template<
typename _Tp>
1376 {
typedef _Tp type; };
1378 template<
typename _Tp>
1380 {
typedef _Tp type; };
1383 template<
typename _Tp>
1385 {
typedef _Tp type; };
1387 template<
typename _Tp>
1389 {
typedef _Tp type; };
1392 template<
typename _Tp>
1396 remove_const<typename remove_volatile<_Tp>::type>::type type;
1400 template<
typename _Tp>
1402 {
typedef _Tp
const type; };
1405 template<
typename _Tp>
1407 {
typedef _Tp
volatile type; };
1410 template<
typename _Tp>
1417 #if __cplusplus > 201103L
1419 #define __cpp_lib_transformation_trait_aliases 201304
1422 template<
typename _Tp>
1426 template<
typename _Tp>
1430 template<
typename _Tp>
1434 template<
typename _Tp>
1438 template<
typename _Tp>
1442 template<
typename _Tp>
1449 template<
typename _Tp>
1451 {
typedef _Tp type; };
1453 template<
typename _Tp>
1455 {
typedef _Tp type; };
1457 template<
typename _Tp>
1458 struct remove_reference<_Tp&&>
1459 {
typedef _Tp type; };
1461 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1462 struct __add_lvalue_reference_helper
1463 {
typedef _Tp type; };
1465 template<
typename _Tp>
1466 struct __add_lvalue_reference_helper<_Tp, true>
1467 {
typedef _Tp& type; };
1470 template<
typename _Tp>
1472 :
public __add_lvalue_reference_helper<_Tp>
1475 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1476 struct __add_rvalue_reference_helper
1477 {
typedef _Tp type; };
1479 template<
typename _Tp>
1480 struct __add_rvalue_reference_helper<_Tp, true>
1481 {
typedef _Tp&& type; };
1484 template<
typename _Tp>
1486 :
public __add_rvalue_reference_helper<_Tp>
1489 #if __cplusplus > 201103L
1491 template<
typename _Tp>
1495 template<
typename _Tp>
1499 template<
typename _Tp>
1506 template<
typename _Unqualified,
bool _IsConst,
bool _IsVol>
1507 struct __cv_selector;
1509 template<
typename _Unqualified>
1510 struct __cv_selector<_Unqualified, false, false>
1511 {
typedef _Unqualified __type; };
1513 template<
typename _Unqualified>
1514 struct __cv_selector<_Unqualified, false, true>
1515 {
typedef volatile _Unqualified __type; };
1517 template<
typename _Unqualified>
1518 struct __cv_selector<_Unqualified, true, false>
1519 {
typedef const _Unqualified __type; };
1521 template<
typename _Unqualified>
1522 struct __cv_selector<_Unqualified, true, true>
1523 {
typedef const volatile _Unqualified __type; };
1525 template<
typename _Qualified,
typename _Unqualified,
1526 bool _IsConst = is_const<_Qualified>::value,
1527 bool _IsVol = is_volatile<_Qualified>::value>
1528 class __match_cv_qualifiers
1530 typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match;
1533 typedef typename __match::__type __type;
1537 template<
typename _Tp>
1538 struct __make_unsigned
1539 {
typedef _Tp __type; };
1542 struct __make_unsigned<char>
1543 {
typedef unsigned char __type; };
1546 struct __make_unsigned<signed char>
1547 {
typedef unsigned char __type; };
1550 struct __make_unsigned<short>
1551 {
typedef unsigned short __type; };
1554 struct __make_unsigned<int>
1555 {
typedef unsigned int __type; };
1558 struct __make_unsigned<long>
1559 {
typedef unsigned long __type; };
1562 struct __make_unsigned<long long>
1563 {
typedef unsigned long long __type; };
1565 #if defined(__GLIBCXX_TYPE_INT_N_0)
1567 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_0>
1568 {
typedef unsigned __GLIBCXX_TYPE_INT_N_0 __type; };
1570 #if defined(__GLIBCXX_TYPE_INT_N_1)
1572 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_1>
1573 {
typedef unsigned __GLIBCXX_TYPE_INT_N_1 __type; };
1575 #if defined(__GLIBCXX_TYPE_INT_N_2)
1577 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_2>
1578 {
typedef unsigned __GLIBCXX_TYPE_INT_N_2 __type; };
1580 #if defined(__GLIBCXX_TYPE_INT_N_3)
1582 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_3>
1583 {
typedef unsigned __GLIBCXX_TYPE_INT_N_3 __type; };
1587 template<
typename _Tp,
1588 bool _IsInt = is_integral<_Tp>::value,
1589 bool _IsEnum = is_enum<_Tp>::value>
1590 class __make_unsigned_selector;
1592 template<
typename _Tp>
1593 class __make_unsigned_selector<_Tp, true, false>
1595 using __unsigned_type
1596 =
typename __make_unsigned<typename remove_cv<_Tp>::type>::__type;
1600 =
typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type;
1603 class __make_unsigned_selector_base
1606 template<
typename...>
struct _List { };
1608 template<
typename _Tp,
typename... _Up>
1609 struct _List<_Tp, _Up...> : _List<_Up...>
1610 {
static constexpr
size_t __size =
sizeof(_Tp); };
1612 template<
size_t _Sz,
typename _Tp,
bool = (_Sz <= _Tp::__size)>
1615 template<
size_t _Sz,
typename _U
int,
typename... _UInts>
1616 struct __select<_Sz, _List<_Uint, _UInts...>,
true>
1617 {
using __type = _Uint; };
1619 template<
size_t _Sz,
typename _Uint,
typename... _UInts>
1620 struct __select<_Sz, _List<_Uint, _UInts...>, false>
1621 : __select<_Sz, _List<_UInts...>>
1626 template<
typename _Tp>
1627 class __make_unsigned_selector<_Tp, false, true>
1628 : __make_unsigned_selector_base
1631 using _UInts = _List<
unsigned char,
unsigned short,
unsigned int,
1632 unsigned long,
unsigned long long>;
1634 using __unsigned_type =
typename __select<sizeof(_Tp), _UInts>::__type;
1638 =
typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type;
1645 #if defined(_GLIBCXX_USE_WCHAR_T)
1647 struct __make_unsigned<wchar_t>
1650 =
typename __make_unsigned_selector<wchar_t, false, true>::__type;
1654 #ifdef _GLIBCXX_USE_CHAR8_T
1656 struct __make_unsigned<char8_t>
1659 =
typename __make_unsigned_selector<char8_t, false, true>::__type;
1664 struct __make_unsigned<char16_t>
1667 =
typename __make_unsigned_selector<char16_t, false, true>::__type;
1671 struct __make_unsigned<char32_t>
1674 =
typename __make_unsigned_selector<char32_t, false, true>::__type;
1681 template<
typename _Tp>
1683 {
typedef typename __make_unsigned_selector<_Tp>::__type type; };
1691 template<
typename _Tp>
1692 struct __make_signed
1693 {
typedef _Tp __type; };
1696 struct __make_signed<char>
1697 {
typedef signed char __type; };
1700 struct __make_signed<unsigned char>
1701 {
typedef signed char __type; };
1704 struct __make_signed<unsigned short>
1705 {
typedef signed short __type; };
1708 struct __make_signed<unsigned int>
1709 {
typedef signed int __type; };
1712 struct __make_signed<unsigned long>
1713 {
typedef signed long __type; };
1716 struct __make_signed<unsigned long long>
1717 {
typedef signed long long __type; };
1719 #if defined(__GLIBCXX_TYPE_INT_N_0)
1721 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_0>
1722 {
typedef __GLIBCXX_TYPE_INT_N_0 __type; };
1724 #if defined(__GLIBCXX_TYPE_INT_N_1)
1726 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_1>
1727 {
typedef __GLIBCXX_TYPE_INT_N_1 __type; };
1729 #if defined(__GLIBCXX_TYPE_INT_N_2)
1731 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_2>
1732 {
typedef __GLIBCXX_TYPE_INT_N_2 __type; };
1734 #if defined(__GLIBCXX_TYPE_INT_N_3)
1736 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_3>
1737 {
typedef __GLIBCXX_TYPE_INT_N_3 __type; };
1741 template<
typename _Tp,
1742 bool _IsInt = is_integral<_Tp>::value,
1743 bool _IsEnum = is_enum<_Tp>::value>
1744 class __make_signed_selector;
1746 template<
typename _Tp>
1747 class __make_signed_selector<_Tp, true, false>
1750 =
typename __make_signed<typename remove_cv<_Tp>::type>::__type;
1754 =
typename __match_cv_qualifiers<_Tp, __signed_type>::__type;
1758 template<
typename _Tp>
1759 class __make_signed_selector<_Tp, false, true>
1761 typedef typename __make_unsigned_selector<_Tp>::__type __unsigned_type;
1764 typedef typename __make_signed_selector<__unsigned_type>::__type __type;
1771 #if defined(_GLIBCXX_USE_WCHAR_T)
1773 struct __make_signed<wchar_t>
1776 =
typename __make_signed_selector<wchar_t, false, true>::__type;
1780 #if defined(_GLIBCXX_USE_CHAR8_T)
1782 struct __make_signed<char8_t>
1785 =
typename __make_signed_selector<char8_t, false, true>::__type;
1790 struct __make_signed<char16_t>
1793 =
typename __make_signed_selector<char16_t, false, true>::__type;
1797 struct __make_signed<char32_t>
1800 =
typename __make_signed_selector<char32_t, false, true>::__type;
1807 template<
typename _Tp>
1809 {
typedef typename __make_signed_selector<_Tp>::__type type; };
1815 #if __cplusplus > 201103L
1817 template<
typename _Tp>
1821 template<
typename _Tp>
1828 template<
typename _Tp>
1830 {
typedef _Tp type; };
1832 template<
typename _Tp, std::
size_t _Size>
1834 {
typedef _Tp type; };
1836 template<
typename _Tp>
1837 struct remove_extent<_Tp[]>
1838 {
typedef _Tp type; };
1841 template<
typename _Tp>
1842 struct remove_all_extents
1843 {
typedef _Tp type; };
1845 template<
typename _Tp, std::
size_t _Size>
1846 struct remove_all_extents<_Tp[_Size]>
1847 {
typedef typename remove_all_extents<_Tp>::type type; };
1849 template<
typename _Tp>
1850 struct remove_all_extents<_Tp[]>
1851 {
typedef typename remove_all_extents<_Tp>::type type; };
1853 #if __cplusplus > 201103L
1855 template<
typename _Tp>
1859 template<
typename _Tp>
1865 template<
typename _Tp,
typename>
1866 struct __remove_pointer_helper
1867 {
typedef _Tp type; };
1869 template<
typename _Tp,
typename _Up>
1870 struct __remove_pointer_helper<_Tp, _Up*>
1871 {
typedef _Up type; };
1874 template<
typename _Tp>
1876 :
public __remove_pointer_helper<_Tp, typename remove_cv<_Tp>::type>
1880 template<
typename _Tp,
bool = __or_<__is_referenceable<_Tp>,
1881 is_
void<_Tp>>::value>
1883 {
typedef _Tp type; };
1885 template<
typename _Tp>
1887 {
typedef typename remove_reference<_Tp>::type* type; };
1889 template<
typename _Tp>
1891 :
public __add_pointer_helper<_Tp>
1894 #if __cplusplus > 201103L
1896 template<
typename _Tp>
1900 template<
typename _Tp>
1904 template<std::
size_t _Len>
1905 struct __aligned_storage_msa
1909 unsigned char __data[_Len];
1910 struct __attribute__((__aligned__)) { } __align;
1924 template<std::size_t _Len, std::size_t _Align =
1925 __alignof__(
typename __aligned_storage_msa<_Len>::__type)>
1930 unsigned char __data[_Len];
1931 struct __attribute__((__aligned__((_Align)))) { } __align;
1935 template <
typename... _Types>
1936 struct __strictest_alignment
1938 static const size_t _S_alignment = 0;
1939 static const size_t _S_size = 0;
1942 template <
typename _Tp,
typename... _Types>
1943 struct __strictest_alignment<_Tp, _Types...>
1945 static const size_t _S_alignment =
1946 alignof(_Tp) > __strictest_alignment<_Types...>::_S_alignment
1947 ?
alignof(_Tp) : __strictest_alignment<_Types...>::_S_alignment;
1948 static const size_t _S_size =
1949 sizeof(_Tp) > __strictest_alignment<_Types...>::_S_size
1950 ?
sizeof(_Tp) : __strictest_alignment<_Types...>::_S_size;
1963 template <
size_t _Len,
typename... _Types>
1967 static_assert(
sizeof...(_Types) != 0,
"At least one type is required");
1969 using __strictest = __strictest_alignment<_Types...>;
1970 static const size_t _S_len = _Len > __strictest::_S_size
1971 ? _Len : __strictest::_S_size;
1974 static const size_t alignment_value = __strictest::_S_alignment;
1979 template <
size_t _Len,
typename... _Types>
1980 const size_t aligned_union<_Len, _Types...>::alignment_value;
1984 template<
typename _Up,
1987 struct __decay_selector;
1990 template<
typename _Up>
1991 struct __decay_selector<_Up, false, false>
1992 {
typedef typename remove_cv<_Up>::type __type; };
1994 template<
typename _Up>
1995 struct __decay_selector<_Up, true, false>
1996 {
typedef typename remove_extent<_Up>::type* __type; };
1998 template<
typename _Up>
1999 struct __decay_selector<_Up, false, true>
2000 {
typedef typename add_pointer<_Up>::type __type; };
2003 template<
typename _Tp>
2006 typedef typename remove_reference<_Tp>::type __remove_type;
2009 typedef typename __decay_selector<__remove_type>::__type type;
2012 template<
typename _Tp>
2016 template<
typename _Tp>
2017 struct __strip_reference_wrapper
2022 template<
typename _Tp>
2025 typedef _Tp& __type;
2028 template<
typename _Tp>
2029 struct __decay_and_strip
2031 typedef typename __strip_reference_wrapper<
2032 typename decay<_Tp>::type>::__type __type;
2038 template<
bool,
typename _Tp =
void>
2043 template<
typename _Tp>
2045 {
typedef _Tp type; };
2047 template<
typename... _Cond>
2048 using _Require =
typename enable_if<__and_<_Cond...>::value>::type;
2052 template<
bool _Cond,
typename _Iftrue,
typename _Iffalse>
2054 {
typedef _Iftrue type; };
2057 template<
typename _Iftrue,
typename _Iffalse>
2058 struct conditional<false, _Iftrue, _Iffalse>
2059 {
typedef _Iffalse type; };
2062 template<
typename... _Tp>
2067 struct __do_common_type_impl
2069 template<
typename _Tp,
typename _Up>
2070 static __success_type<
typename decay<decltype
2071 (
true ? std::declval<_Tp>()
2072 : std::declval<_Up>())>::type> _S_test(
int);
2074 template<
typename,
typename>
2075 static __failure_type _S_test(...);
2078 template<
typename _Tp,
typename _Up>
2079 struct __common_type_impl
2080 :
private __do_common_type_impl
2082 typedef decltype(_S_test<_Tp, _Up>(0)) type;
2085 struct __do_member_type_wrapper
2087 template<
typename _Tp>
2088 static __success_type<typename _Tp::type> _S_test(
int);
2091 static __failure_type _S_test(...);
2094 template<
typename _Tp>
2095 struct __member_type_wrapper
2096 :
private __do_member_type_wrapper
2098 typedef decltype(_S_test<_Tp>(0)) type;
2101 template<typename _CTp, typename... _Args>
2102 struct __expanded_common_type_wrapper
2104 typedef common_type<
typename _CTp::type, _Args...> type;
2107 template<
typename... _Args>
2108 struct __expanded_common_type_wrapper<__failure_type, _Args...>
2109 {
typedef __failure_type type; };
2112 struct common_type<>
2115 template<
typename _Tp>
2116 struct common_type<_Tp>
2117 : common_type<_Tp, _Tp>
2120 template<
typename _Tp,
typename _Up>
2121 struct common_type<_Tp, _Up>
2122 :
public __common_type_impl<_Tp, _Up>::type
2125 template<
typename _Tp,
typename _Up,
typename... _Vp>
2126 struct common_type<_Tp, _Up, _Vp...>
2127 :
public __expanded_common_type_wrapper<typename __member_type_wrapper<
2128 common_type<_Tp, _Up>>::type, _Vp...>::type
2131 template<typename _Tp, bool = is_enum<_Tp>::value>
2132 struct __underlying_type_impl
2134 using type = __underlying_type(_Tp);
2137 template<
typename _Tp>
2138 struct __underlying_type_impl<_Tp, false>
2142 template<
typename _Tp>
2144 :
public __underlying_type_impl<_Tp>
2147 template<
typename _Tp>
2148 struct __declval_protector
2150 static const bool __stop =
false;
2153 template<
typename _Tp>
2154 auto declval() noexcept -> decltype(__declval<_Tp>(0))
2156 static_assert(__declval_protector<_Tp>::__stop,
2157 "declval() must not be used!");
2158 return __declval<_Tp>(0);
2162 template<
typename _Tp>
2163 using __remove_cvref_t
2164 =
typename remove_cv<typename remove_reference<_Tp>::type>::type;
2167 template<
typename _Signature>
2172 #define __cpp_lib_result_of_sfinae 201210
2174 struct __invoke_memfun_ref { };
2175 struct __invoke_memfun_deref { };
2176 struct __invoke_memobj_ref { };
2177 struct __invoke_memobj_deref { };
2178 struct __invoke_other { };
2181 template<
typename _Tp,
typename _Tag>
2182 struct __result_of_success : __success_type<_Tp>
2183 {
using __invoke_type = _Tag; };
2186 struct __result_of_memfun_ref_impl
2188 template<
typename _Fp,
typename _Tp1,
typename... _Args>
2189 static __result_of_success<decltype(
2190 (std::declval<_Tp1>().*std::declval<_Fp>())(std::declval<_Args>()...)
2191 ), __invoke_memfun_ref> _S_test(
int);
2193 template<
typename...>
2194 static __failure_type _S_test(...);
2197 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2198 struct __result_of_memfun_ref
2199 :
private __result_of_memfun_ref_impl
2201 typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type;
2205 struct __result_of_memfun_deref_impl
2207 template<
typename _Fp,
typename _Tp1,
typename... _Args>
2208 static __result_of_success<decltype(
2209 ((*std::declval<_Tp1>()).*std::declval<_Fp>())(std::declval<_Args>()...)
2210 ), __invoke_memfun_deref> _S_test(
int);
2212 template<
typename...>
2213 static __failure_type _S_test(...);
2216 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2217 struct __result_of_memfun_deref
2218 :
private __result_of_memfun_deref_impl
2220 typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type;
2224 struct __result_of_memobj_ref_impl
2226 template<
typename _Fp,
typename _Tp1>
2227 static __result_of_success<decltype(
2228 std::declval<_Tp1>().*std::declval<_Fp>()
2229 ), __invoke_memobj_ref> _S_test(
int);
2231 template<
typename,
typename>
2232 static __failure_type _S_test(...);
2235 template<
typename _MemPtr,
typename _Arg>
2236 struct __result_of_memobj_ref
2237 :
private __result_of_memobj_ref_impl
2239 typedef decltype(_S_test<_MemPtr, _Arg>(0)) type;
2243 struct __result_of_memobj_deref_impl
2245 template<
typename _Fp,
typename _Tp1>
2246 static __result_of_success<decltype(
2247 (*std::declval<_Tp1>()).*std::declval<_Fp>()
2248 ), __invoke_memobj_deref> _S_test(
int);
2250 template<
typename,
typename>
2251 static __failure_type _S_test(...);
2254 template<
typename _MemPtr,
typename _Arg>
2255 struct __result_of_memobj_deref
2256 :
private __result_of_memobj_deref_impl
2258 typedef decltype(_S_test<_MemPtr, _Arg>(0)) type;
2261 template<typename _MemPtr, typename _Arg>
2262 struct __result_of_memobj;
2264 template<typename _Res, typename _Class, typename _Arg>
2265 struct __result_of_memobj<_Res _Class::*, _Arg>
2267 typedef __remove_cvref_t<_Arg> _Argval;
2268 typedef _Res _Class::* _MemPtr;
2269 typedef typename conditional<__or_<is_same<_Argval, _Class>,
2270 is_base_of<_Class, _Argval>>::value,
2271 __result_of_memobj_ref<_MemPtr, _Arg>,
2272 __result_of_memobj_deref<_MemPtr, _Arg>
2276 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2277 struct __result_of_memfun;
2279 template<
typename _Res,
typename _Class,
typename _Arg,
typename... _Args>
2280 struct __result_of_memfun<_Res _Class::*, _Arg, _Args...>
2282 typedef typename remove_reference<_Arg>::type _Argval;
2283 typedef _Res _Class::* _MemPtr;
2284 typedef typename conditional<is_base_of<_Class, _Argval>::value,
2285 __result_of_memfun_ref<_MemPtr, _Arg, _Args...>,
2286 __result_of_memfun_deref<_MemPtr, _Arg, _Args...>
2295 template<
typename _Tp,
typename _Up = __remove_cvref_t<_Tp>>
2301 template<
typename _Tp,
typename _Up>
2302 struct __inv_unwrap<_Tp, reference_wrapper<_Up>>
2307 template<bool, bool,
typename _Functor,
typename... _ArgTypes>
2308 struct __result_of_impl
2310 typedef __failure_type type;
2313 template<
typename _MemPtr,
typename _Arg>
2314 struct __result_of_impl<true, false, _MemPtr, _Arg>
2315 :
public __result_of_memobj<typename decay<_MemPtr>::type,
2316 typename __inv_unwrap<_Arg>::type>
2319 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2320 struct __result_of_impl<false, true, _MemPtr, _Arg, _Args...>
2321 :
public __result_of_memfun<typename decay<_MemPtr>::type,
2322 typename __inv_unwrap<_Arg>::type, _Args...>
2326 struct __result_of_other_impl
2328 template<
typename _Fn,
typename... _Args>
2329 static __result_of_success<decltype(
2330 std::declval<_Fn>()(std::declval<_Args>()...)
2331 ), __invoke_other> _S_test(
int);
2333 template<
typename...>
2334 static __failure_type _S_test(...);
2337 template<
typename _Functor,
typename... _ArgTypes>
2338 struct __result_of_impl<false, false, _Functor, _ArgTypes...>
2339 :
private __result_of_other_impl
2341 typedef decltype(_S_test<_Functor, _ArgTypes...>(0)) type;
2345 template<typename _Functor, typename... _ArgTypes>
2346 struct __invoke_result
2347 : public __result_of_impl<
2348 is_member_object_pointer<
2349 typename remove_reference<_Functor>::type
2351 is_member_function_pointer<
2352 typename remove_reference<_Functor>::type
2354 _Functor, _ArgTypes...
2358 template<
typename _Functor,
typename... _ArgTypes>
2359 struct result_of<_Functor(_ArgTypes...)>
2360 :
public __invoke_result<_Functor, _ArgTypes...>
2363 #if __cplusplus >= 201402L
2365 template<
size_t _Len,
size_t _Align =
2366 __alignof__(
typename __aligned_storage_msa<_Len>::__type)>
2369 template <
size_t _Len,
typename... _Types>
2370 using aligned_union_t =
typename aligned_union<_Len, _Types...>::type;
2373 template<
typename _Tp>
2377 template<
bool _Cond,
typename _Tp =
void>
2381 template<
bool _Cond,
typename _Iftrue,
typename _Iffalse>
2385 template<
typename... _Tp>
2389 template<
typename _Tp>
2393 template<
typename _Tp>
2398 template<
bool _Cond,
typename _Tp =
void>
2402 template<
typename...>
using __void_t = void;
2404 #if __cplusplus >= 201703L || !defined(__STRICT_ANSI__) // c++17 or gnu++11
2405 #define __cpp_lib_void_t 201411
2411 template<
typename _Default,
typename _AlwaysVoid,
2412 template<
typename...>
class _Op,
typename... _Args>
2416 using type = _Default;
2420 template<
typename _Default,
template<
typename...>
class _Op,
2422 struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...>
2425 using type = _Op<_Args...>;
2429 template<
typename _Default,
template<
typename...>
class _Op,
2434 template<
typename _Default,
template<
typename...>
class _Op,
2436 using __detected_or_t
2445 #define _GLIBCXX_HAS_NESTED_TYPE(_NTYPE) \
2446 template<typename _Tp, typename = __void_t<>> \
2447 struct __has_##_NTYPE \
2450 template<typename _Tp> \
2451 struct __has_##_NTYPE<_Tp, __void_t<typename _Tp::_NTYPE>> \
2455 template <
typename _Tp>
2456 struct __is_swappable;
2458 template <
typename _Tp>
2459 struct __is_nothrow_swappable;
2461 template<
typename... _Elements>
2468 template<
typename... _Tps>
2469 struct __is_tuple_like_impl<tuple<_Tps...>> :
true_type
2473 template<
typename _Tp>
2474 struct __is_tuple_like
2475 :
public __is_tuple_like_impl<__remove_cvref_t<_Tp>>::type
2478 template<
typename _Tp>
2480 typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>,
2481 is_move_constructible<_Tp>,
2482 is_move_assignable<_Tp>>::value>::type
2484 noexcept(__and_<is_nothrow_move_constructible<_Tp>,
2485 is_nothrow_move_assignable<_Tp>>::value);
2487 template<typename _Tp,
size_t _Nm>
2489 typename enable_if<__is_swappable<_Tp>::value>::type
2490 swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
2491 noexcept(__is_nothrow_swappable<_Tp>::value);
2493 namespace __swappable_details {
2496 struct __do_is_swappable_impl
2498 template<
typename _Tp,
typename
2499 = decltype(swap(std::declval<_Tp&>(), std::declval<_Tp&>()))>
2506 struct __do_is_nothrow_swappable_impl
2508 template<
typename _Tp>
2509 static __bool_constant<
2510 noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>()))
2519 template<
typename _Tp>
2520 struct __is_swappable_impl
2521 :
public __swappable_details::__do_is_swappable_impl
2523 typedef decltype(__test<_Tp>(0)) type;
2526 template<typename _Tp>
2527 struct __is_nothrow_swappable_impl
2528 : public __swappable_details::__do_is_nothrow_swappable_impl
2530 typedef decltype(__test<_Tp>(0)) type;
2533 template<typename _Tp>
2534 struct __is_swappable
2535 : public __is_swappable_impl<_Tp>::type
2538 template<
typename _Tp>
2539 struct __is_nothrow_swappable
2540 :
public __is_nothrow_swappable_impl<_Tp>::type
2543 #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
2544 #define __cpp_lib_is_swappable 201603
2548 template<
typename _Tp>
2550 :
public __is_swappable_impl<_Tp>::type
2554 template<
typename _Tp>
2556 :
public __is_nothrow_swappable_impl<_Tp>::type
2559 #if __cplusplus >= 201402L
2561 template<
typename _Tp>
2566 template<
typename _Tp>
2569 #endif // __cplusplus >= 201402L
2571 namespace __swappable_with_details {
2574 struct __do_is_swappable_with_impl
2576 template<
typename _Tp,
typename _Up,
typename
2577 = decltype(swap(std::declval<_Tp>(), std::declval<_Up>())),
2579 = decltype(swap(std::declval<_Up>(), std::declval<_Tp>()))>
2582 template<
typename,
typename>
2586 struct __do_is_nothrow_swappable_with_impl
2588 template<
typename _Tp,
typename _Up>
2590 noexcept(swap(std::declval<_Tp>(), std::declval<_Up>()))
2592 noexcept(swap(std::declval<_Up>(), std::declval<_Tp>()))
2595 template<
typename,
typename>
2601 template<
typename _Tp,
typename _Up>
2602 struct __is_swappable_with_impl
2603 :
public __swappable_with_details::__do_is_swappable_with_impl
2605 typedef decltype(__test<_Tp, _Up>(0)) type;
2609 template<typename _Tp>
2610 struct __is_swappable_with_impl<_Tp&, _Tp&>
2611 : public __swappable_details::__do_is_swappable_impl
2613 typedef decltype(__test<_Tp&>(0)) type;
2616 template<typename _Tp, typename _Up>
2617 struct __is_nothrow_swappable_with_impl
2618 : public __swappable_with_details::__do_is_nothrow_swappable_with_impl
2620 typedef decltype(__test<_Tp, _Up>(0)) type;
2624 template<typename _Tp>
2625 struct __is_nothrow_swappable_with_impl<_Tp&, _Tp&>
2626 : public __swappable_details::__do_is_nothrow_swappable_impl
2628 typedef decltype(__test<_Tp&>(0)) type;
2632 template<typename _Tp, typename _Up>
2634 : public __is_swappable_with_impl<_Tp, _Up>::type
2638 template<
typename _Tp,
typename _Up>
2640 :
public __is_nothrow_swappable_with_impl<_Tp, _Up>::type
2643 #if __cplusplus >= 201402L
2645 template<
typename _Tp,
typename _Up>
2650 template<
typename _Tp,
typename _Up>
2653 #endif // __cplusplus >= 201402L
2655 #endif// c++1z or gnu++11
2660 template<
typename _Result,
typename _Ret,
2665 template<
typename _Result,
typename _Ret>
2666 struct __is_invocable_impl<_Result, _Ret,
2668 __void_t<typename _Result::type>>
2672 #pragma GCC diagnostic push
2673 #pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
2675 template<
typename _Result,
typename _Ret>
2676 struct __is_invocable_impl<_Result, _Ret,
2678 __void_t<typename _Result::type>>
2683 static typename _Result::type _S_get();
2685 template<
typename _Tp>
2686 static void _S_conv(_Tp);
2689 template<
typename _Tp,
typename = decltype(_S_conv<_Tp>(_S_get()))>
2693 template<
typename _Tp>
2698 using type = decltype(_S_test<_Ret>(1));
2700 #pragma GCC diagnostic pop
2702 template<
typename _Fn,
typename... _ArgTypes>
2703 struct __is_invocable
2704 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type
2707 template<
typename _Fn,
typename _Tp,
typename... _Args>
2708 constexpr
bool __call_is_nt(__invoke_memfun_ref)
2710 using _Up =
typename __inv_unwrap<_Tp>::type;
2711 return noexcept((std::declval<_Up>().*std::declval<_Fn>())(
2712 std::declval<_Args>()...));
2715 template<
typename _Fn,
typename _Tp,
typename... _Args>
2716 constexpr
bool __call_is_nt(__invoke_memfun_deref)
2718 return noexcept(((*std::declval<_Tp>()).*std::declval<_Fn>())(
2719 std::declval<_Args>()...));
2722 template<
typename _Fn,
typename _Tp>
2723 constexpr
bool __call_is_nt(__invoke_memobj_ref)
2725 using _Up =
typename __inv_unwrap<_Tp>::type;
2726 return noexcept(std::declval<_Up>().*std::declval<_Fn>());
2729 template<
typename _Fn,
typename _Tp>
2730 constexpr
bool __call_is_nt(__invoke_memobj_deref)
2732 return noexcept((*std::declval<_Tp>()).*std::declval<_Fn>());
2735 template<
typename _Fn,
typename... _Args>
2736 constexpr
bool __call_is_nt(__invoke_other)
2738 return noexcept(std::declval<_Fn>()(std::declval<_Args>()...));
2741 template<
typename _Result,
typename _Fn,
typename... _Args>
2742 struct __call_is_nothrow
2744 std::__call_is_nt<_Fn, _Args...>(typename _Result::__invoke_type{})
2748 template<
typename _Fn,
typename... _Args>
2749 using __call_is_nothrow_
2750 = __call_is_nothrow<__invoke_result<_Fn, _Args...>, _Fn, _Args...>;
2753 template<
typename _Fn,
typename... _Args>
2754 struct __is_nothrow_invocable
2755 : __and_<__is_invocable<_Fn, _Args...>,
2756 __call_is_nothrow_<_Fn, _Args...>>::type
2760 __nonesuch() =
delete;
2761 ~__nonesuch() =
delete;
2762 __nonesuch(__nonesuch
const&) =
delete;
2763 void operator=(__nonesuch
const&) =
delete;
2766 #if __cplusplus >= 201703L
2767 # define __cpp_lib_is_invocable 201703
2770 template<
typename _Functor,
typename... _ArgTypes>
2771 struct invoke_result
2772 :
public __invoke_result<_Functor, _ArgTypes...>
2776 template<
typename _Fn,
typename... _Args>
2777 using invoke_result_t =
typename invoke_result<_Fn, _Args...>::type;
2780 template<
typename _Fn,
typename... _ArgTypes>
2782 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type
2786 template<
typename _Ret,
typename _Fn,
typename... _ArgTypes>
2787 struct is_invocable_r
2788 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>::type
2792 template<
typename _Fn,
typename... _ArgTypes>
2793 struct is_nothrow_invocable
2794 : __and_<__is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>,
2795 __call_is_nothrow_<_Fn, _ArgTypes...>>::type
2798 template<
typename _Result,
typename _Ret,
typename =
void>
2799 struct __is_nt_invocable_impl :
false_type { };
2801 template<
typename _Result,
typename _Ret>
2802 struct __is_nt_invocable_impl<_Result, _Ret,
2803 __void_t<typename _Result::type>>
2804 : __or_<is_void<_Ret>,
2805 __and_<is_convertible<typename _Result::type, _Ret>,
2806 is_nothrow_constructible<_Ret, typename _Result::type>>>
2810 template<
typename _Ret,
typename _Fn,
typename... _ArgTypes>
2811 struct is_nothrow_invocable_r
2812 : __and_<__is_nt_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>,
2813 __call_is_nothrow_<_Fn, _ArgTypes...>>::type
2817 template<
typename _Fn,
typename... _Args>
2818 inline constexpr
bool is_invocable_v = is_invocable<_Fn, _Args...>::value;
2821 template<
typename _Fn,
typename... _Args>
2822 inline constexpr
bool is_nothrow_invocable_v
2823 = is_nothrow_invocable<_Fn, _Args...>::value;
2826 template<
typename _Fn,
typename... _Args>
2827 inline constexpr
bool is_invocable_r_v
2828 = is_invocable_r<_Fn, _Args...>::value;
2831 template<
typename _Fn,
typename... _Args>
2832 inline constexpr
bool is_nothrow_invocable_r_v
2833 = is_nothrow_invocable_r<_Fn, _Args...>::value;
2836 #if __cplusplus >= 201703L
2837 # define __cpp_lib_type_trait_variable_templates 201510L
2838 template <
typename _Tp>
2839 inline constexpr
bool is_void_v = is_void<_Tp>::value;
2840 template <
typename _Tp>
2841 inline constexpr
bool is_null_pointer_v = is_null_pointer<_Tp>::value;
2842 template <
typename _Tp>
2843 inline constexpr
bool is_integral_v = is_integral<_Tp>::value;
2844 template <
typename _Tp>
2845 inline constexpr
bool is_floating_point_v = is_floating_point<_Tp>::value;
2846 template <
typename _Tp>
2847 inline constexpr
bool is_array_v = is_array<_Tp>::value;
2848 template <
typename _Tp>
2849 inline constexpr
bool is_pointer_v = is_pointer<_Tp>::value;
2850 template <
typename _Tp>
2851 inline constexpr
bool is_lvalue_reference_v =
2852 is_lvalue_reference<_Tp>::value;
2853 template <
typename _Tp>
2854 inline constexpr
bool is_rvalue_reference_v =
2855 is_rvalue_reference<_Tp>::value;
2856 template <
typename _Tp>
2857 inline constexpr
bool is_member_object_pointer_v =
2858 is_member_object_pointer<_Tp>::value;
2859 template <
typename _Tp>
2860 inline constexpr
bool is_member_function_pointer_v =
2861 is_member_function_pointer<_Tp>::value;
2862 template <
typename _Tp>
2863 inline constexpr
bool is_enum_v = is_enum<_Tp>::value;
2864 template <
typename _Tp>
2865 inline constexpr
bool is_union_v = is_union<_Tp>::value;
2866 template <
typename _Tp>
2867 inline constexpr
bool is_class_v = is_class<_Tp>::value;
2868 template <
typename _Tp>
2869 inline constexpr
bool is_function_v = is_function<_Tp>::value;
2870 template <
typename _Tp>
2871 inline constexpr
bool is_reference_v = is_reference<_Tp>::value;
2872 template <
typename _Tp>
2873 inline constexpr
bool is_arithmetic_v = is_arithmetic<_Tp>::value;
2874 template <
typename _Tp>
2875 inline constexpr
bool is_fundamental_v = is_fundamental<_Tp>::value;
2876 template <
typename _Tp>
2877 inline constexpr
bool is_object_v = is_object<_Tp>::value;
2878 template <
typename _Tp>
2879 inline constexpr
bool is_scalar_v = is_scalar<_Tp>::value;
2880 template <
typename _Tp>
2881 inline constexpr
bool is_compound_v = is_compound<_Tp>::value;
2882 template <
typename _Tp>
2883 inline constexpr
bool is_member_pointer_v = is_member_pointer<_Tp>::value;
2884 template <
typename _Tp>
2885 inline constexpr
bool is_const_v = is_const<_Tp>::value;
2886 template <
typename _Tp>
2887 inline constexpr
bool is_volatile_v = is_volatile<_Tp>::value;
2888 template <
typename _Tp>
2889 inline constexpr
bool is_trivial_v = is_trivial<_Tp>::value;
2890 template <
typename _Tp>
2891 inline constexpr
bool is_trivially_copyable_v =
2892 is_trivially_copyable<_Tp>::value;
2893 template <
typename _Tp>
2894 inline constexpr
bool is_standard_layout_v = is_standard_layout<_Tp>::value;
2895 template <
typename _Tp>
2896 inline constexpr
bool is_pod_v = is_pod<_Tp>::value;
2897 template <
typename _Tp>
2898 inline constexpr
bool is_literal_type_v = is_literal_type<_Tp>::value;
2899 template <
typename _Tp>
2900 inline constexpr
bool is_empty_v = is_empty<_Tp>::value;
2901 template <
typename _Tp>
2902 inline constexpr
bool is_polymorphic_v = is_polymorphic<_Tp>::value;
2903 template <
typename _Tp>
2904 inline constexpr
bool is_abstract_v = is_abstract<_Tp>::value;
2905 template <
typename _Tp>
2906 inline constexpr
bool is_final_v = is_final<_Tp>::value;
2907 template <
typename _Tp>
2908 inline constexpr
bool is_signed_v = is_signed<_Tp>::value;
2909 template <
typename _Tp>
2910 inline constexpr
bool is_unsigned_v = is_unsigned<_Tp>::value;
2911 template <
typename _Tp,
typename... _Args>
2912 inline constexpr
bool is_constructible_v =
2913 is_constructible<_Tp, _Args...>::value;
2914 template <
typename _Tp>
2915 inline constexpr
bool is_default_constructible_v =
2916 is_default_constructible<_Tp>::value;
2917 template <
typename _Tp>
2918 inline constexpr
bool is_copy_constructible_v =
2919 is_copy_constructible<_Tp>::value;
2920 template <
typename _Tp>
2921 inline constexpr
bool is_move_constructible_v =
2922 is_move_constructible<_Tp>::value;
2923 template <
typename _Tp,
typename _Up>
2924 inline constexpr
bool is_assignable_v = is_assignable<_Tp, _Up>::value;
2925 template <
typename _Tp>
2926 inline constexpr
bool is_copy_assignable_v = is_copy_assignable<_Tp>::value;
2927 template <
typename _Tp>
2928 inline constexpr
bool is_move_assignable_v = is_move_assignable<_Tp>::value;
2929 template <
typename _Tp>
2930 inline constexpr
bool is_destructible_v = is_destructible<_Tp>::value;
2931 template <
typename _Tp,
typename... _Args>
2932 inline constexpr
bool is_trivially_constructible_v =
2933 is_trivially_constructible<_Tp, _Args...>::value;
2934 template <
typename _Tp>
2935 inline constexpr
bool is_trivially_default_constructible_v =
2936 is_trivially_default_constructible<_Tp>::value;
2937 template <
typename _Tp>
2938 inline constexpr
bool is_trivially_copy_constructible_v =
2939 is_trivially_copy_constructible<_Tp>::value;
2940 template <
typename _Tp>
2941 inline constexpr
bool is_trivially_move_constructible_v =
2942 is_trivially_move_constructible<_Tp>::value;
2943 template <
typename _Tp,
typename _Up>
2944 inline constexpr
bool is_trivially_assignable_v =
2945 is_trivially_assignable<_Tp, _Up>::value;
2946 template <
typename _Tp>
2947 inline constexpr
bool is_trivially_copy_assignable_v =
2948 is_trivially_copy_assignable<_Tp>::value;
2949 template <
typename _Tp>
2950 inline constexpr
bool is_trivially_move_assignable_v =
2951 is_trivially_move_assignable<_Tp>::value;
2952 template <
typename _Tp>
2953 inline constexpr
bool is_trivially_destructible_v =
2954 is_trivially_destructible<_Tp>::value;
2955 template <
typename _Tp,
typename... _Args>
2956 inline constexpr
bool is_nothrow_constructible_v =
2957 is_nothrow_constructible<_Tp, _Args...>::value;
2958 template <
typename _Tp>
2959 inline constexpr
bool is_nothrow_default_constructible_v =
2960 is_nothrow_default_constructible<_Tp>::value;
2961 template <
typename _Tp>
2962 inline constexpr
bool is_nothrow_copy_constructible_v =
2963 is_nothrow_copy_constructible<_Tp>::value;
2964 template <
typename _Tp>
2965 inline constexpr
bool is_nothrow_move_constructible_v =
2966 is_nothrow_move_constructible<_Tp>::value;
2967 template <
typename _Tp,
typename _Up>
2968 inline constexpr
bool is_nothrow_assignable_v =
2969 is_nothrow_assignable<_Tp, _Up>::value;
2970 template <
typename _Tp>
2971 inline constexpr
bool is_nothrow_copy_assignable_v =
2972 is_nothrow_copy_assignable<_Tp>::value;
2973 template <
typename _Tp>
2974 inline constexpr
bool is_nothrow_move_assignable_v =
2975 is_nothrow_move_assignable<_Tp>::value;
2976 template <
typename _Tp>
2977 inline constexpr
bool is_nothrow_destructible_v =
2978 is_nothrow_destructible<_Tp>::value;
2979 template <
typename _Tp>
2980 inline constexpr
bool has_virtual_destructor_v =
2981 has_virtual_destructor<_Tp>::value;
2982 template <
typename _Tp>
2983 inline constexpr
size_t alignment_of_v = alignment_of<_Tp>::value;
2984 template <
typename _Tp>
2985 inline constexpr
size_t rank_v = rank<_Tp>::value;
2986 template <
typename _Tp,
unsigned _Idx = 0>
2987 inline constexpr
size_t extent_v = extent<_Tp, _Idx>::value;
2988 template <
typename _Tp,
typename _Up>
2989 inline constexpr
bool is_same_v = is_same<_Tp, _Up>::value;
2990 template <
typename _Base,
typename _Derived>
2991 inline constexpr
bool is_base_of_v = is_base_of<_Base, _Derived>::value;
2992 template <
typename _From,
typename _To>
2993 inline constexpr
bool is_convertible_v = is_convertible<_From, _To>::value;
2995 #ifdef _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP
2996 # define __cpp_lib_has_unique_object_representations 201606
2998 template<
typename _Tp>
2999 struct has_unique_object_representations
3000 : bool_constant<__has_unique_object_representations(
3001 remove_cv_t<remove_all_extents_t<_Tp>>
3005 template<
typename _Tp>
3006 inline constexpr
bool has_unique_object_representations_v
3007 = has_unique_object_representations<_Tp>::value;
3010 #ifdef _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE
3011 # define __cpp_lib_is_aggregate 201703
3013 template<
typename _Tp>
3015 : bool_constant<__is_aggregate(remove_cv_t<_Tp>)> { };
3018 template<
typename _Tp>
3019 inline constexpr
bool is_aggregate_v = is_aggregate<_Tp>::value;
3023 #if __cplusplus > 201703L
3024 #define __cpp_lib_remove_cvref 201711L
3027 template<
typename _Tp>
3030 using type = __remove_cvref_t<_Tp>;
3033 template<
typename _Tp>
3034 using remove_cvref_t = __remove_cvref_t<_Tp>;
3036 #define __cpp_lib_type_identity 201806L
3038 template<
typename _Tp>
3039 struct type_identity {
using type = _Tp; };
3041 template<
typename _Tp>
3042 using type_identity_t =
typename type_identity<_Tp>::type;
3044 #define __cpp_lib_unwrap_ref 201811L
3047 template<
typename _Tp>
3048 struct unwrap_reference {
using type = _Tp; };
3050 template<
typename _Tp>
3051 struct unwrap_reference<reference_wrapper<_Tp>> {
using type = _Tp&; };
3053 template<
typename _Tp>
3054 using unwrap_reference_t =
typename unwrap_reference<_Tp>::type;
3057 template<
typename _Tp>
3058 struct unwrap_ref_decay {
using type = unwrap_reference_t<decay_t<_Tp>>; };
3060 template<
typename _Tp>
3061 using unwrap_ref_decay_t =
typename unwrap_ref_decay<_Tp>::type;
3063 #define __cpp_lib_bounded_array_traits 201902L
3066 template<
typename _Tp>
3067 struct is_bounded_array
3068 :
public __is_array_known_bounds<_Tp>
3072 template<
typename _Tp>
3073 struct is_unbounded_array
3074 :
public __is_array_unknown_bounds<_Tp>
3077 template<
typename _Tp>
3078 inline constexpr
bool is_bounded_array_v
3079 = is_bounded_array<_Tp>::value;
3081 template<
typename _Tp>
3082 inline constexpr
bool is_unbounded_array_v
3083 = is_unbounded_array<_Tp>::value;
3085 #ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED
3087 #define __cpp_lib_is_constant_evaluated 201811L
3089 constexpr
inline bool
3090 is_constant_evaluated() noexcept
3091 {
return __builtin_is_constant_evaluated(); }
3096 _GLIBCXX_END_NAMESPACE_VERSION
3101 #endif // _GLIBCXX_TYPE_TRAITS
typename conditional< _Cond, _Iftrue, _Iffalse >::type conditional_t
Alias template for conditional.
typename remove_all_extents< _Tp >::type remove_all_extents_t
Alias template for remove_all_extents.
void void_t
A metafunction that always yields void, used for detecting valid types.
typename remove_volatile< _Tp >::type remove_volatile_t
Alias template for remove_volatile.
typename add_volatile< _Tp >::type add_volatile_t
Alias template for add_volatile.
is_trivially_copy_constructible
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
is_trivially_destructible
typename aligned_storage< _Len, _Align >::type aligned_storage_t
Alias template for aligned_storage.
is_nothrow_default_constructible
is_nothrow_copy_assignable
_GLIBCXX17_INLINE constexpr bool is_swappable_with_v
is_swappable_with_v
typename add_pointer< _Tp >::type add_pointer_t
Alias template for add_pointer.
Provide aligned storage for types.
typename underlying_type< _Tp >::type underlying_type_t
Alias template for underlying_type.
is_nothrow_move_constructible
The underlying type of an enum.
Implementation of the detection idiom (negative case).
typename remove_const< _Tp >::type remove_const_t
Alias template for remove_const.
Metafunctions used for detecting swappable types: p0185r1.
typename remove_extent< _Tp >::type remove_extent_t
Alias template for remove_extent.
typename add_lvalue_reference< _Tp >::type add_lvalue_reference_t
Alias template for add_lvalue_reference.
is_null_pointer (LWG 2247).
typename enable_if< _Cond, _Tp >::type enable_if_t
Alias template for enable_if.
is_trivially_default_constructible
_GLIBCXX17_INLINE constexpr bool is_nothrow_swappable_with_v
is_nothrow_swappable_with_v
is_nothrow_copy_constructible
typename make_signed< _Tp >::type make_signed_t
Alias template for make_signed.
typename common_type< _Tp...>::type common_type_t
Alias template for common_type.
is_trivially_copy_assignable
Primary class template for reference_wrapper.
is_trivially_move_constructible
typename result_of< _Tp >::type result_of_t
Alias template for result_of.
typename decay< _Tp >::type decay_t
Alias template for decay.
typename remove_reference< _Tp >::type remove_reference_t
Alias template for remove_reference.
typename make_unsigned< _Tp >::type make_unsigned_t
Alias template for make_unsigned.
is_nothrow_move_assignable
Define a member typedef type only if a boolean constant is true.
typename remove_pointer< _Tp >::type remove_pointer_t
Alias template for remove_pointer.
aligned_storage< _S_len, alignment_value >::type type
The storage.
is_nothrow_swappable_with
_GLIBCXX17_INLINE constexpr bool is_swappable_v
is_swappable_v
is_trivially_constructible
is_member_function_pointer
typename add_const< _Tp >::type add_const_t
Alias template for add_const.
Define a member typedef type to one of two argument types.
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
is_trivially_move_assignable
typename add_cv< _Tp >::type add_cv_t
Alias template for add_cv.
__is_nullptr_t (extension).
typename add_rvalue_reference< _Tp >::type add_rvalue_reference_t
Alias template for add_rvalue_reference.
_GLIBCXX17_INLINE constexpr bool is_nothrow_swappable_v
is_nothrow_swappable_v
typename remove_cv< _Tp >::type remove_cv_t
Alias template for remove_cv.