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)
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<
typename _Tp>
930 struct __is_nt_default_constructible_atom
934 template<typename _Tp, bool = is_array<_Tp>::value>
935 struct __is_nt_default_constructible_impl;
937 template<
typename _Tp>
938 struct __is_nt_default_constructible_impl<_Tp, true>
939 :
public __and_<__is_array_known_bounds<_Tp>,
940 __is_nt_default_constructible_atom<typename
941 remove_all_extents<_Tp>::type>>
944 template<
typename _Tp>
945 struct __is_nt_default_constructible_impl<_Tp, false>
946 :
public __is_nt_default_constructible_atom<_Tp>
950 template<
typename _Tp>
952 :
public __and_<is_default_constructible<_Tp>,
953 __is_nt_default_constructible_impl<_Tp>>
956 template<
typename _Tp,
typename... _Args>
957 struct __is_nt_constructible_impl
961 template<
typename _Tp,
typename _Arg>
962 struct __is_nt_constructible_impl<_Tp, _Arg>
963 :
public integral_constant<bool,
964 noexcept(static_cast<_Tp>(declval<_Arg>()))>
967 template<
typename _Tp>
968 struct __is_nt_constructible_impl<_Tp>
969 :
public is_nothrow_default_constructible<_Tp>
973 template<
typename _Tp,
typename... _Args>
975 :
public __and_<is_constructible<_Tp, _Args...>,
976 __is_nt_constructible_impl<_Tp, _Args...>>
979 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
980 struct __is_nothrow_copy_constructible_impl;
982 template<
typename _Tp>
983 struct __is_nothrow_copy_constructible_impl<_Tp, false>
986 template<
typename _Tp>
987 struct __is_nothrow_copy_constructible_impl<_Tp, true>
988 :
public is_nothrow_constructible<_Tp, const _Tp&>
992 template<
typename _Tp>
994 :
public __is_nothrow_copy_constructible_impl<_Tp>
997 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
998 struct __is_nothrow_move_constructible_impl;
1000 template<
typename _Tp>
1001 struct __is_nothrow_move_constructible_impl<_Tp, false>
1004 template<
typename _Tp>
1005 struct __is_nothrow_move_constructible_impl<_Tp, true>
1006 :
public is_nothrow_constructible<_Tp, _Tp&&>
1010 template<
typename _Tp>
1012 :
public __is_nothrow_move_constructible_impl<_Tp>
1016 template<
typename _Tp,
typename _Up>
1021 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1022 struct __is_copy_assignable_impl;
1024 template<
typename _Tp>
1025 struct __is_copy_assignable_impl<_Tp, false>
1028 template<
typename _Tp>
1029 struct __is_copy_assignable_impl<_Tp, true>
1030 :
public is_assignable<_Tp&, const _Tp&>
1034 template<
typename _Tp>
1036 :
public __is_copy_assignable_impl<_Tp>
1039 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1040 struct __is_move_assignable_impl;
1042 template<
typename _Tp>
1043 struct __is_move_assignable_impl<_Tp, false>
1046 template<
typename _Tp>
1047 struct __is_move_assignable_impl<_Tp, true>
1048 :
public is_assignable<_Tp&, _Tp&&>
1052 template<
typename _Tp>
1054 :
public __is_move_assignable_impl<_Tp>
1057 template<
typename _Tp,
typename _Up>
1058 struct __is_nt_assignable_impl
1063 template<
typename _Tp,
typename _Up>
1065 :
public __and_<is_assignable<_Tp, _Up>,
1066 __is_nt_assignable_impl<_Tp, _Up>>
1069 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1070 struct __is_nt_copy_assignable_impl;
1072 template<
typename _Tp>
1073 struct __is_nt_copy_assignable_impl<_Tp, false>
1076 template<
typename _Tp>
1077 struct __is_nt_copy_assignable_impl<_Tp, true>
1078 :
public is_nothrow_assignable<_Tp&, const _Tp&>
1082 template<
typename _Tp>
1084 :
public __is_nt_copy_assignable_impl<_Tp>
1087 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1088 struct __is_nt_move_assignable_impl;
1090 template<
typename _Tp>
1091 struct __is_nt_move_assignable_impl<_Tp, false>
1094 template<
typename _Tp>
1095 struct __is_nt_move_assignable_impl<_Tp, true>
1096 :
public is_nothrow_assignable<_Tp&, _Tp&&>
1100 template<
typename _Tp>
1102 :
public __is_nt_move_assignable_impl<_Tp>
1106 template<
typename _Tp,
typename... _Args>
1112 template<
typename _Tp>
1117 struct __do_is_implicitly_default_constructible_impl
1119 template <
typename _Tp>
1120 static void __helper(
const _Tp&);
1122 template <
typename _Tp>
1124 decltype(__helper<const _Tp&>({}))* = 0);
1129 template<
typename _Tp>
1130 struct __is_implicitly_default_constructible_impl
1131 :
public __do_is_implicitly_default_constructible_impl
1133 typedef decltype(__test(declval<_Tp>())) type;
1136 template<typename _Tp>
1137 struct __is_implicitly_default_constructible_safe
1138 : public __is_implicitly_default_constructible_impl<_Tp>::type
1141 template <
typename _Tp>
1142 struct __is_implicitly_default_constructible
1143 :
public __and_<is_default_constructible<_Tp>,
1144 __is_implicitly_default_constructible_safe<_Tp>>
1149 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1152 template<
typename _Tp>
1156 template<
typename _Tp>
1158 :
public __and_<is_copy_constructible<_Tp>,
1159 integral_constant<bool,
1160 __is_trivially_constructible(_Tp, const _Tp&)>>
1163 template<
typename _Tp>
1164 struct is_trivially_copy_constructible
1165 :
public __is_trivially_copy_constructible_impl<_Tp>
1170 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1173 template<
typename _Tp>
1177 template<
typename _Tp>
1179 :
public __and_<is_move_constructible<_Tp>,
1180 integral_constant<bool,
1181 __is_trivially_constructible(_Tp, _Tp&&)>>
1184 template<
typename _Tp>
1185 struct is_trivially_move_constructible
1186 :
public __is_trivially_move_constructible_impl<_Tp>
1190 template<
typename _Tp,
typename _Up>
1197 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1200 template<
typename _Tp>
1204 template<
typename _Tp>
1209 template<
typename _Tp>
1210 struct is_trivially_copy_assignable
1211 :
public __is_trivially_copy_assignable_impl<_Tp>
1216 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1219 template<
typename _Tp>
1223 template<
typename _Tp>
1228 template<
typename _Tp>
1229 struct is_trivially_move_assignable
1230 :
public __is_trivially_move_assignable_impl<_Tp>
1234 template<
typename _Tp>
1236 :
public __and_<is_destructible<_Tp>,
1237 __bool_constant<__has_trivial_destructor(_Tp)>>
1242 template<
typename _Tp>
1251 template<
typename _Tp>
1260 template<
typename _Tp, std::
size_t _Size>
1261 struct rank<_Tp[_Size]>
1264 template<
typename _Tp>
1266 :
public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
1269 template<
typename,
unsigned _U
int>
1271 :
public integral_constant<std::size_t, 0> { };
1273 template<
typename _Tp,
unsigned _U
int, std::
size_t _Size>
1274 struct extent<_Tp[_Size], _Uint>
1275 :
public integral_constant<std::size_t,
1276 _Uint == 0 ? _Size : extent<_Tp,
1280 template<
typename _Tp,
unsigned _U
int>
1281 struct extent<_Tp[], _Uint>
1282 :
public integral_constant<std::size_t,
1283 _Uint == 0 ? 0 : extent<_Tp,
1291 template<
typename,
typename>
1295 template<
typename _Tp>
1300 template<
typename _Base,
typename _Derived>
1305 template<
typename _From,
typename _To,
1308 struct __is_convertible_helper
1313 template<
typename _From,
typename _To>
1314 class __is_convertible_helper<_From, _To, false>
1316 template<
typename _To1>
1317 static void __test_aux(_To1)
noexcept;
1319 template<typename _From1, typename _To1,
1320 typename = decltype(__test_aux<_To1>(std::declval<_From1>()))>
1324 template<typename, typename>
1329 typedef decltype(__test<_From, _To>(0)) type;
1334 template<typename _From, typename _To>
1336 : public __is_convertible_helper<_From, _To>::type
1339 #if __cplusplus > 201703L
1340 template<
typename _From,
typename _To,
1343 struct __is_nt_convertible_helper
1347 template<
typename _From,
typename _To>
1348 class __is_nt_convertible_helper<_From, _To, false>
1350 template<
typename _To1>
1351 static void __test_aux(_To1)
noexcept;
1353 template<typename _From1, typename _To1>
1354 static bool_constant<noexcept(__test_aux<_To1>(std::declval<_From1>()))>
1357 template<typename, typename>
1362 using type = decltype(__test<_From, _To>(0));
1366 template<typename _From, typename _To>
1367 struct is_nothrow_convertible
1368 : public __is_nt_convertible_helper<_From, _To>::type
1372 template<
typename _From,
typename _To>
1373 inline constexpr
bool is_nothrow_convertible_v
1374 = is_nothrow_convertible<_From, _To>::value;
1380 template<
typename _Tp>
1382 {
typedef _Tp type; };
1384 template<
typename _Tp>
1386 {
typedef _Tp type; };
1389 template<
typename _Tp>
1391 {
typedef _Tp type; };
1393 template<
typename _Tp>
1395 {
typedef _Tp type; };
1398 template<
typename _Tp>
1402 remove_const<typename remove_volatile<_Tp>::type>::type type;
1406 template<
typename _Tp>
1408 {
typedef _Tp
const type; };
1411 template<
typename _Tp>
1413 {
typedef _Tp
volatile type; };
1416 template<
typename _Tp>
1423 #if __cplusplus > 201103L
1425 #define __cpp_lib_transformation_trait_aliases 201304
1428 template<
typename _Tp>
1432 template<
typename _Tp>
1436 template<
typename _Tp>
1440 template<
typename _Tp>
1444 template<
typename _Tp>
1448 template<
typename _Tp>
1455 template<
typename _Tp>
1457 {
typedef _Tp type; };
1459 template<
typename _Tp>
1461 {
typedef _Tp type; };
1463 template<
typename _Tp>
1464 struct remove_reference<_Tp&&>
1465 {
typedef _Tp type; };
1467 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1468 struct __add_lvalue_reference_helper
1469 {
typedef _Tp type; };
1471 template<
typename _Tp>
1472 struct __add_lvalue_reference_helper<_Tp, true>
1473 {
typedef _Tp& type; };
1476 template<
typename _Tp>
1478 :
public __add_lvalue_reference_helper<_Tp>
1481 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1482 struct __add_rvalue_reference_helper
1483 {
typedef _Tp type; };
1485 template<
typename _Tp>
1486 struct __add_rvalue_reference_helper<_Tp, true>
1487 {
typedef _Tp&& type; };
1490 template<
typename _Tp>
1492 :
public __add_rvalue_reference_helper<_Tp>
1495 #if __cplusplus > 201103L
1497 template<
typename _Tp>
1501 template<
typename _Tp>
1505 template<
typename _Tp>
1512 template<
typename _Unqualified,
bool _IsConst,
bool _IsVol>
1513 struct __cv_selector;
1515 template<
typename _Unqualified>
1516 struct __cv_selector<_Unqualified, false, false>
1517 {
typedef _Unqualified __type; };
1519 template<
typename _Unqualified>
1520 struct __cv_selector<_Unqualified, false, true>
1521 {
typedef volatile _Unqualified __type; };
1523 template<
typename _Unqualified>
1524 struct __cv_selector<_Unqualified, true, false>
1525 {
typedef const _Unqualified __type; };
1527 template<
typename _Unqualified>
1528 struct __cv_selector<_Unqualified, true, true>
1529 {
typedef const volatile _Unqualified __type; };
1531 template<
typename _Qualified,
typename _Unqualified,
1532 bool _IsConst = is_const<_Qualified>::value,
1533 bool _IsVol = is_volatile<_Qualified>::value>
1534 class __match_cv_qualifiers
1536 typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match;
1539 typedef typename __match::__type __type;
1543 template<
typename _Tp>
1544 struct __make_unsigned
1545 {
typedef _Tp __type; };
1548 struct __make_unsigned<char>
1549 {
typedef unsigned char __type; };
1552 struct __make_unsigned<signed char>
1553 {
typedef unsigned char __type; };
1556 struct __make_unsigned<short>
1557 {
typedef unsigned short __type; };
1560 struct __make_unsigned<int>
1561 {
typedef unsigned int __type; };
1564 struct __make_unsigned<long>
1565 {
typedef unsigned long __type; };
1568 struct __make_unsigned<long long>
1569 {
typedef unsigned long long __type; };
1571 #if defined(__GLIBCXX_TYPE_INT_N_0)
1573 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_0>
1574 {
typedef unsigned __GLIBCXX_TYPE_INT_N_0 __type; };
1576 #if defined(__GLIBCXX_TYPE_INT_N_1)
1578 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_1>
1579 {
typedef unsigned __GLIBCXX_TYPE_INT_N_1 __type; };
1581 #if defined(__GLIBCXX_TYPE_INT_N_2)
1583 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_2>
1584 {
typedef unsigned __GLIBCXX_TYPE_INT_N_2 __type; };
1586 #if defined(__GLIBCXX_TYPE_INT_N_3)
1588 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_3>
1589 {
typedef unsigned __GLIBCXX_TYPE_INT_N_3 __type; };
1593 template<
typename _Tp,
1594 bool _IsInt = is_integral<_Tp>::value,
1595 bool _IsEnum = is_enum<_Tp>::value>
1596 class __make_unsigned_selector;
1598 template<
typename _Tp>
1599 class __make_unsigned_selector<_Tp, true, false>
1601 using __unsigned_type
1602 =
typename __make_unsigned<typename remove_cv<_Tp>::type>::__type;
1606 =
typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type;
1609 class __make_unsigned_selector_base
1612 template<
typename...>
struct _List { };
1614 template<
typename _Tp,
typename... _Up>
1615 struct _List<_Tp, _Up...> : _List<_Up...>
1616 {
static constexpr
size_t __size =
sizeof(_Tp); };
1618 template<
size_t _Sz,
typename _Tp,
bool = (_Sz <= _Tp::__size)>
1621 template<
size_t _Sz,
typename _U
int,
typename... _UInts>
1622 struct __select<_Sz, _List<_Uint, _UInts...>,
true>
1623 {
using __type = _Uint; };
1625 template<
size_t _Sz,
typename _Uint,
typename... _UInts>
1626 struct __select<_Sz, _List<_Uint, _UInts...>, false>
1627 : __select<_Sz, _List<_UInts...>>
1632 template<
typename _Tp>
1633 class __make_unsigned_selector<_Tp, false, true>
1634 : __make_unsigned_selector_base
1637 using _UInts = _List<
unsigned char,
unsigned short,
unsigned int,
1638 unsigned long,
unsigned long long>;
1640 using __unsigned_type =
typename __select<sizeof(_Tp), _UInts>::__type;
1644 =
typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type;
1651 #if defined(_GLIBCXX_USE_WCHAR_T)
1653 struct __make_unsigned<wchar_t>
1656 =
typename __make_unsigned_selector<wchar_t, false, true>::__type;
1660 #ifdef _GLIBCXX_USE_CHAR8_T
1662 struct __make_unsigned<char8_t>
1665 =
typename __make_unsigned_selector<char8_t, false, true>::__type;
1670 struct __make_unsigned<char16_t>
1673 =
typename __make_unsigned_selector<char16_t, false, true>::__type;
1677 struct __make_unsigned<char32_t>
1680 =
typename __make_unsigned_selector<char32_t, false, true>::__type;
1687 template<
typename _Tp>
1689 {
typedef typename __make_unsigned_selector<_Tp>::__type type; };
1697 template<
typename _Tp>
1698 struct __make_signed
1699 {
typedef _Tp __type; };
1702 struct __make_signed<char>
1703 {
typedef signed char __type; };
1706 struct __make_signed<unsigned char>
1707 {
typedef signed char __type; };
1710 struct __make_signed<unsigned short>
1711 {
typedef signed short __type; };
1714 struct __make_signed<unsigned int>
1715 {
typedef signed int __type; };
1718 struct __make_signed<unsigned long>
1719 {
typedef signed long __type; };
1722 struct __make_signed<unsigned long long>
1723 {
typedef signed long long __type; };
1725 #if defined(__GLIBCXX_TYPE_INT_N_0)
1727 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_0>
1728 {
typedef __GLIBCXX_TYPE_INT_N_0 __type; };
1730 #if defined(__GLIBCXX_TYPE_INT_N_1)
1732 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_1>
1733 {
typedef __GLIBCXX_TYPE_INT_N_1 __type; };
1735 #if defined(__GLIBCXX_TYPE_INT_N_2)
1737 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_2>
1738 {
typedef __GLIBCXX_TYPE_INT_N_2 __type; };
1740 #if defined(__GLIBCXX_TYPE_INT_N_3)
1742 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_3>
1743 {
typedef __GLIBCXX_TYPE_INT_N_3 __type; };
1747 template<
typename _Tp,
1748 bool _IsInt = is_integral<_Tp>::value,
1749 bool _IsEnum = is_enum<_Tp>::value>
1750 class __make_signed_selector;
1752 template<
typename _Tp>
1753 class __make_signed_selector<_Tp, true, false>
1756 =
typename __make_signed<typename remove_cv<_Tp>::type>::__type;
1760 =
typename __match_cv_qualifiers<_Tp, __signed_type>::__type;
1764 template<
typename _Tp>
1765 class __make_signed_selector<_Tp, false, true>
1767 typedef typename __make_unsigned_selector<_Tp>::__type __unsigned_type;
1770 typedef typename __make_signed_selector<__unsigned_type>::__type __type;
1777 #if defined(_GLIBCXX_USE_WCHAR_T)
1779 struct __make_signed<wchar_t>
1782 =
typename __make_signed_selector<wchar_t, false, true>::__type;
1786 #if defined(_GLIBCXX_USE_CHAR8_T)
1788 struct __make_signed<char8_t>
1791 =
typename __make_signed_selector<char8_t, false, true>::__type;
1796 struct __make_signed<char16_t>
1799 =
typename __make_signed_selector<char16_t, false, true>::__type;
1803 struct __make_signed<char32_t>
1806 =
typename __make_signed_selector<char32_t, false, true>::__type;
1813 template<
typename _Tp>
1815 {
typedef typename __make_signed_selector<_Tp>::__type type; };
1821 #if __cplusplus > 201103L
1823 template<
typename _Tp>
1827 template<
typename _Tp>
1834 template<
typename _Tp>
1836 {
typedef _Tp type; };
1838 template<
typename _Tp, std::
size_t _Size>
1840 {
typedef _Tp type; };
1842 template<
typename _Tp>
1843 struct remove_extent<_Tp[]>
1844 {
typedef _Tp type; };
1847 template<
typename _Tp>
1848 struct remove_all_extents
1849 {
typedef _Tp type; };
1851 template<
typename _Tp, std::
size_t _Size>
1852 struct remove_all_extents<_Tp[_Size]>
1853 {
typedef typename remove_all_extents<_Tp>::type type; };
1855 template<
typename _Tp>
1856 struct remove_all_extents<_Tp[]>
1857 {
typedef typename remove_all_extents<_Tp>::type type; };
1859 #if __cplusplus > 201103L
1861 template<
typename _Tp>
1865 template<
typename _Tp>
1871 template<
typename _Tp,
typename>
1872 struct __remove_pointer_helper
1873 {
typedef _Tp type; };
1875 template<
typename _Tp,
typename _Up>
1876 struct __remove_pointer_helper<_Tp, _Up*>
1877 {
typedef _Up type; };
1880 template<
typename _Tp>
1882 :
public __remove_pointer_helper<_Tp, typename remove_cv<_Tp>::type>
1886 template<
typename _Tp,
bool = __or_<__is_referenceable<_Tp>,
1887 is_
void<_Tp>>::value>
1889 {
typedef _Tp type; };
1891 template<
typename _Tp>
1893 {
typedef typename remove_reference<_Tp>::type* type; };
1895 template<
typename _Tp>
1897 :
public __add_pointer_helper<_Tp>
1900 #if __cplusplus > 201103L
1902 template<
typename _Tp>
1906 template<
typename _Tp>
1910 template<std::
size_t _Len>
1911 struct __aligned_storage_msa
1915 unsigned char __data[_Len];
1916 struct __attribute__((__aligned__)) { } __align;
1930 template<std::size_t _Len, std::size_t _Align =
1931 __alignof__(
typename __aligned_storage_msa<_Len>::__type)>
1936 unsigned char __data[_Len];
1937 struct __attribute__((__aligned__((_Align)))) { } __align;
1941 template <
typename... _Types>
1942 struct __strictest_alignment
1944 static const size_t _S_alignment = 0;
1945 static const size_t _S_size = 0;
1948 template <
typename _Tp,
typename... _Types>
1949 struct __strictest_alignment<_Tp, _Types...>
1951 static const size_t _S_alignment =
1952 alignof(_Tp) > __strictest_alignment<_Types...>::_S_alignment
1953 ?
alignof(_Tp) : __strictest_alignment<_Types...>::_S_alignment;
1954 static const size_t _S_size =
1955 sizeof(_Tp) > __strictest_alignment<_Types...>::_S_size
1956 ?
sizeof(_Tp) : __strictest_alignment<_Types...>::_S_size;
1969 template <
size_t _Len,
typename... _Types>
1973 static_assert(
sizeof...(_Types) != 0,
"At least one type is required");
1975 using __strictest = __strictest_alignment<_Types...>;
1976 static const size_t _S_len = _Len > __strictest::_S_size
1977 ? _Len : __strictest::_S_size;
1980 static const size_t alignment_value = __strictest::_S_alignment;
1985 template <
size_t _Len,
typename... _Types>
1986 const size_t aligned_union<_Len, _Types...>::alignment_value;
1990 template<
typename _Up,
1993 struct __decay_selector;
1996 template<
typename _Up>
1997 struct __decay_selector<_Up, false, false>
1998 {
typedef typename remove_cv<_Up>::type __type; };
2000 template<
typename _Up>
2001 struct __decay_selector<_Up, true, false>
2002 {
typedef typename remove_extent<_Up>::type* __type; };
2004 template<
typename _Up>
2005 struct __decay_selector<_Up, false, true>
2006 {
typedef typename add_pointer<_Up>::type __type; };
2009 template<
typename _Tp>
2012 typedef typename remove_reference<_Tp>::type __remove_type;
2015 typedef typename __decay_selector<__remove_type>::__type type;
2018 template<
typename _Tp>
2022 template<
typename _Tp>
2023 struct __strip_reference_wrapper
2028 template<
typename _Tp>
2031 typedef _Tp& __type;
2034 template<
typename _Tp>
2035 struct __decay_and_strip
2037 typedef typename __strip_reference_wrapper<
2038 typename decay<_Tp>::type>::__type __type;
2044 template<
bool,
typename _Tp =
void>
2049 template<
typename _Tp>
2051 {
typedef _Tp type; };
2053 template<
typename... _Cond>
2054 using _Require =
typename enable_if<__and_<_Cond...>::value>::type;
2058 template<
bool _Cond,
typename _Iftrue,
typename _Iffalse>
2060 {
typedef _Iftrue type; };
2063 template<
typename _Iftrue,
typename _Iffalse>
2064 struct conditional<false, _Iftrue, _Iffalse>
2065 {
typedef _Iffalse type; };
2068 template<
typename... _Tp>
2073 struct __do_common_type_impl
2075 template<
typename _Tp,
typename _Up>
2076 static __success_type<
typename decay<decltype
2077 (
true ? std::declval<_Tp>()
2078 : std::declval<_Up>())>::type> _S_test(
int);
2080 template<
typename,
typename>
2081 static __failure_type _S_test(...);
2084 template<
typename _Tp,
typename _Up>
2085 struct __common_type_impl
2086 :
private __do_common_type_impl
2088 typedef decltype(_S_test<_Tp, _Up>(0)) type;
2091 struct __do_member_type_wrapper
2093 template<
typename _Tp>
2094 static __success_type<typename _Tp::type> _S_test(
int);
2097 static __failure_type _S_test(...);
2100 template<
typename _Tp>
2101 struct __member_type_wrapper
2102 :
private __do_member_type_wrapper
2104 typedef decltype(_S_test<_Tp>(0)) type;
2107 template<typename _CTp, typename... _Args>
2108 struct __expanded_common_type_wrapper
2110 typedef common_type<
typename _CTp::type, _Args...> type;
2113 template<
typename... _Args>
2114 struct __expanded_common_type_wrapper<__failure_type, _Args...>
2115 {
typedef __failure_type type; };
2118 struct common_type<>
2121 template<
typename _Tp>
2122 struct common_type<_Tp>
2123 : common_type<_Tp, _Tp>
2126 template<
typename _Tp,
typename _Up>
2127 struct common_type<_Tp, _Up>
2128 :
public __common_type_impl<_Tp, _Up>::type
2131 template<
typename _Tp,
typename _Up,
typename... _Vp>
2132 struct common_type<_Tp, _Up, _Vp...>
2133 :
public __expanded_common_type_wrapper<typename __member_type_wrapper<
2134 common_type<_Tp, _Up>>::type, _Vp...>::type
2137 template<typename _Tp, bool = is_enum<_Tp>::value>
2138 struct __underlying_type_impl
2140 using type = __underlying_type(_Tp);
2143 template<
typename _Tp>
2144 struct __underlying_type_impl<_Tp, false>
2148 template<
typename _Tp>
2150 :
public __underlying_type_impl<_Tp>
2153 template<
typename _Tp>
2154 struct __declval_protector
2156 static const bool __stop =
false;
2159 template<
typename _Tp>
2160 auto declval()
noexcept -> decltype(__declval<_Tp>(0))
2162 static_assert(__declval_protector<_Tp>::__stop,
2163 "declval() must not be used!");
2164 return __declval<_Tp>(0);
2168 template<
typename _Tp>
2169 using __remove_cvref_t
2170 =
typename remove_cv<typename remove_reference<_Tp>::type>::type;
2173 template<
typename _Signature>
2178 #define __cpp_lib_result_of_sfinae 201210
2180 struct __invoke_memfun_ref { };
2181 struct __invoke_memfun_deref { };
2182 struct __invoke_memobj_ref { };
2183 struct __invoke_memobj_deref { };
2184 struct __invoke_other { };
2187 template<
typename _Tp,
typename _Tag>
2188 struct __result_of_success : __success_type<_Tp>
2189 {
using __invoke_type = _Tag; };
2192 struct __result_of_memfun_ref_impl
2194 template<
typename _Fp,
typename _Tp1,
typename... _Args>
2195 static __result_of_success<decltype(
2196 (std::declval<_Tp1>().*std::declval<_Fp>())(std::declval<_Args>()...)
2197 ), __invoke_memfun_ref> _S_test(
int);
2199 template<
typename...>
2200 static __failure_type _S_test(...);
2203 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2204 struct __result_of_memfun_ref
2205 :
private __result_of_memfun_ref_impl
2207 typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type;
2211 struct __result_of_memfun_deref_impl
2213 template<
typename _Fp,
typename _Tp1,
typename... _Args>
2214 static __result_of_success<decltype(
2215 ((*std::declval<_Tp1>()).*std::declval<_Fp>())(std::declval<_Args>()...)
2216 ), __invoke_memfun_deref> _S_test(
int);
2218 template<
typename...>
2219 static __failure_type _S_test(...);
2222 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2223 struct __result_of_memfun_deref
2224 :
private __result_of_memfun_deref_impl
2226 typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type;
2230 struct __result_of_memobj_ref_impl
2232 template<
typename _Fp,
typename _Tp1>
2233 static __result_of_success<decltype(
2234 std::declval<_Tp1>().*std::declval<_Fp>()
2235 ), __invoke_memobj_ref> _S_test(
int);
2237 template<
typename,
typename>
2238 static __failure_type _S_test(...);
2241 template<
typename _MemPtr,
typename _Arg>
2242 struct __result_of_memobj_ref
2243 :
private __result_of_memobj_ref_impl
2245 typedef decltype(_S_test<_MemPtr, _Arg>(0)) type;
2249 struct __result_of_memobj_deref_impl
2251 template<
typename _Fp,
typename _Tp1>
2252 static __result_of_success<decltype(
2253 (*std::declval<_Tp1>()).*std::declval<_Fp>()
2254 ), __invoke_memobj_deref> _S_test(
int);
2256 template<
typename,
typename>
2257 static __failure_type _S_test(...);
2260 template<
typename _MemPtr,
typename _Arg>
2261 struct __result_of_memobj_deref
2262 :
private __result_of_memobj_deref_impl
2264 typedef decltype(_S_test<_MemPtr, _Arg>(0)) type;
2267 template<typename _MemPtr, typename _Arg>
2268 struct __result_of_memobj;
2270 template<typename _Res, typename _Class, typename _Arg>
2271 struct __result_of_memobj<_Res _Class::*, _Arg>
2273 typedef __remove_cvref_t<_Arg> _Argval;
2274 typedef _Res _Class::* _MemPtr;
2275 typedef typename conditional<__or_<is_same<_Argval, _Class>,
2276 is_base_of<_Class, _Argval>>::value,
2277 __result_of_memobj_ref<_MemPtr, _Arg>,
2278 __result_of_memobj_deref<_MemPtr, _Arg>
2282 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2283 struct __result_of_memfun;
2285 template<
typename _Res,
typename _Class,
typename _Arg,
typename... _Args>
2286 struct __result_of_memfun<_Res _Class::*, _Arg, _Args...>
2288 typedef typename remove_reference<_Arg>::type _Argval;
2289 typedef _Res _Class::* _MemPtr;
2290 typedef typename conditional<is_base_of<_Class, _Argval>::value,
2291 __result_of_memfun_ref<_MemPtr, _Arg, _Args...>,
2292 __result_of_memfun_deref<_MemPtr, _Arg, _Args...>
2301 template<
typename _Tp,
typename _Up = __remove_cvref_t<_Tp>>
2307 template<
typename _Tp,
typename _Up>
2308 struct __inv_unwrap<_Tp, reference_wrapper<_Up>>
2313 template<bool, bool,
typename _Functor,
typename... _ArgTypes>
2314 struct __result_of_impl
2316 typedef __failure_type type;
2319 template<
typename _MemPtr,
typename _Arg>
2320 struct __result_of_impl<true, false, _MemPtr, _Arg>
2321 :
public __result_of_memobj<typename decay<_MemPtr>::type,
2322 typename __inv_unwrap<_Arg>::type>
2325 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2326 struct __result_of_impl<false, true, _MemPtr, _Arg, _Args...>
2327 :
public __result_of_memfun<typename decay<_MemPtr>::type,
2328 typename __inv_unwrap<_Arg>::type, _Args...>
2332 struct __result_of_other_impl
2334 template<
typename _Fn,
typename... _Args>
2335 static __result_of_success<decltype(
2336 std::declval<_Fn>()(std::declval<_Args>()...)
2337 ), __invoke_other> _S_test(
int);
2339 template<
typename...>
2340 static __failure_type _S_test(...);
2343 template<
typename _Functor,
typename... _ArgTypes>
2344 struct __result_of_impl<false, false, _Functor, _ArgTypes...>
2345 :
private __result_of_other_impl
2347 typedef decltype(_S_test<_Functor, _ArgTypes...>(0)) type;
2351 template<typename _Functor, typename... _ArgTypes>
2352 struct __invoke_result
2353 : public __result_of_impl<
2354 is_member_object_pointer<
2355 typename remove_reference<_Functor>::type
2357 is_member_function_pointer<
2358 typename remove_reference<_Functor>::type
2360 _Functor, _ArgTypes...
2364 template<
typename _Functor,
typename... _ArgTypes>
2365 struct result_of<_Functor(_ArgTypes...)>
2366 :
public __invoke_result<_Functor, _ArgTypes...>
2369 #if __cplusplus >= 201402L
2371 template<
size_t _Len,
size_t _Align =
2372 __alignof__(
typename __aligned_storage_msa<_Len>::__type)>
2375 template <
size_t _Len,
typename... _Types>
2376 using aligned_union_t =
typename aligned_union<_Len, _Types...>::type;
2379 template<
typename _Tp>
2383 template<
bool _Cond,
typename _Tp =
void>
2387 template<
bool _Cond,
typename _Iftrue,
typename _Iffalse>
2391 template<
typename... _Tp>
2395 template<
typename _Tp>
2399 template<
typename _Tp>
2404 template<
bool _Cond,
typename _Tp =
void>
2408 template<
typename...>
using __void_t = void;
2410 #if __cplusplus >= 201703L || !defined(__STRICT_ANSI__) // c++17 or gnu++11
2411 #define __cpp_lib_void_t 201411
2417 template<
typename _Default,
typename _AlwaysVoid,
2418 template<
typename...>
class _Op,
typename... _Args>
2422 using type = _Default;
2426 template<
typename _Default,
template<
typename...>
class _Op,
2428 struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...>
2431 using type = _Op<_Args...>;
2435 template<
typename _Default,
template<
typename...>
class _Op,
2440 template<
typename _Default,
template<
typename...>
class _Op,
2442 using __detected_or_t
2451 #define _GLIBCXX_HAS_NESTED_TYPE(_NTYPE) \
2452 template<typename _Tp, typename = __void_t<>> \
2453 struct __has_##_NTYPE \
2456 template<typename _Tp> \
2457 struct __has_##_NTYPE<_Tp, __void_t<typename _Tp::_NTYPE>> \
2461 template <
typename _Tp>
2462 struct __is_swappable;
2464 template <
typename _Tp>
2465 struct __is_nothrow_swappable;
2467 template<
typename... _Elements>
2474 template<
typename... _Tps>
2475 struct __is_tuple_like_impl<tuple<_Tps...>> :
true_type
2479 template<
typename _Tp>
2480 struct __is_tuple_like
2481 :
public __is_tuple_like_impl<__remove_cvref_t<_Tp>>::type
2484 template<
typename _Tp>
2486 typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>,
2487 is_move_constructible<_Tp>,
2488 is_move_assignable<_Tp>>::value>::type
2490 noexcept(__and_<is_nothrow_move_constructible<_Tp>,
2491 is_nothrow_move_assignable<_Tp>>::value);
2493 template<typename _Tp,
size_t _Nm>
2495 typename enable_if<__is_swappable<_Tp>::value>::type
2496 swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
2497 noexcept(__is_nothrow_swappable<_Tp>::value);
2499 namespace __swappable_details {
2502 struct __do_is_swappable_impl
2504 template<
typename _Tp,
typename
2505 = decltype(swap(std::declval<_Tp&>(), std::declval<_Tp&>()))>
2512 struct __do_is_nothrow_swappable_impl
2514 template<
typename _Tp>
2515 static __bool_constant<
2516 noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>()))
2525 template<
typename _Tp>
2526 struct __is_swappable_impl
2527 :
public __swappable_details::__do_is_swappable_impl
2529 typedef decltype(__test<_Tp>(0)) type;
2532 template<typename _Tp>
2533 struct __is_nothrow_swappable_impl
2534 : public __swappable_details::__do_is_nothrow_swappable_impl
2536 typedef decltype(__test<_Tp>(0)) type;
2539 template<typename _Tp>
2540 struct __is_swappable
2541 : public __is_swappable_impl<_Tp>::type
2544 template<
typename _Tp>
2545 struct __is_nothrow_swappable
2546 :
public __is_nothrow_swappable_impl<_Tp>::type
2549 #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
2550 #define __cpp_lib_is_swappable 201603
2554 template<
typename _Tp>
2556 :
public __is_swappable_impl<_Tp>::type
2560 template<
typename _Tp>
2562 :
public __is_nothrow_swappable_impl<_Tp>::type
2565 #if __cplusplus >= 201402L
2567 template<
typename _Tp>
2572 template<
typename _Tp>
2575 #endif // __cplusplus >= 201402L
2577 namespace __swappable_with_details {
2580 struct __do_is_swappable_with_impl
2582 template<
typename _Tp,
typename _Up,
typename
2583 = decltype(swap(std::declval<_Tp>(), std::declval<_Up>())),
2585 = decltype(swap(std::declval<_Up>(), std::declval<_Tp>()))>
2588 template<
typename,
typename>
2592 struct __do_is_nothrow_swappable_with_impl
2594 template<
typename _Tp,
typename _Up>
2596 noexcept(swap(std::declval<_Tp>(), std::declval<_Up>()))
2598 noexcept(swap(std::declval<_Up>(), std::declval<_Tp>()))
2601 template<
typename,
typename>
2607 template<
typename _Tp,
typename _Up>
2608 struct __is_swappable_with_impl
2609 :
public __swappable_with_details::__do_is_swappable_with_impl
2611 typedef decltype(__test<_Tp, _Up>(0)) type;
2615 template<typename _Tp>
2616 struct __is_swappable_with_impl<_Tp&, _Tp&>
2617 : public __swappable_details::__do_is_swappable_impl
2619 typedef decltype(__test<_Tp&>(0)) type;
2622 template<typename _Tp, typename _Up>
2623 struct __is_nothrow_swappable_with_impl
2624 : public __swappable_with_details::__do_is_nothrow_swappable_with_impl
2626 typedef decltype(__test<_Tp, _Up>(0)) type;
2630 template<typename _Tp>
2631 struct __is_nothrow_swappable_with_impl<_Tp&, _Tp&>
2632 : public __swappable_details::__do_is_nothrow_swappable_impl
2634 typedef decltype(__test<_Tp&>(0)) type;
2638 template<typename _Tp, typename _Up>
2640 : public __is_swappable_with_impl<_Tp, _Up>::type
2644 template<
typename _Tp,
typename _Up>
2646 :
public __is_nothrow_swappable_with_impl<_Tp, _Up>::type
2649 #if __cplusplus >= 201402L
2651 template<
typename _Tp,
typename _Up>
2656 template<
typename _Tp,
typename _Up>
2659 #endif // __cplusplus >= 201402L
2661 #endif// c++1z or gnu++11
2665 template<
typename _Result,
typename _Ret,
typename =
void>
2668 template<
typename _Result,
typename _Ret>
2669 struct __is_invocable_impl<_Result, _Ret, __void_t<typename _Result::type>>
2670 : __or_<is_void<_Ret>, is_convertible<typename _Result::type, _Ret>>::type
2673 template<
typename _Fn,
typename... _ArgTypes>
2674 struct __is_invocable
2675 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type
2678 template<
typename _Fn,
typename _Tp,
typename... _Args>
2679 constexpr
bool __call_is_nt(__invoke_memfun_ref)
2681 using _Up =
typename __inv_unwrap<_Tp>::type;
2682 return noexcept((std::declval<_Up>().*std::declval<_Fn>())(
2683 std::declval<_Args>()...));
2686 template<
typename _Fn,
typename _Tp,
typename... _Args>
2687 constexpr
bool __call_is_nt(__invoke_memfun_deref)
2689 return noexcept(((*std::declval<_Tp>()).*std::declval<_Fn>())(
2690 std::declval<_Args>()...));
2693 template<
typename _Fn,
typename _Tp>
2694 constexpr
bool __call_is_nt(__invoke_memobj_ref)
2696 using _Up =
typename __inv_unwrap<_Tp>::type;
2697 return noexcept(std::declval<_Up>().*std::declval<_Fn>());
2700 template<
typename _Fn,
typename _Tp>
2701 constexpr
bool __call_is_nt(__invoke_memobj_deref)
2703 return noexcept((*std::declval<_Tp>()).*std::declval<_Fn>());
2706 template<
typename _Fn,
typename... _Args>
2707 constexpr
bool __call_is_nt(__invoke_other)
2709 return noexcept(std::declval<_Fn>()(std::declval<_Args>()...));
2712 template<
typename _Result,
typename _Fn,
typename... _Args>
2713 struct __call_is_nothrow
2715 std::__call_is_nt<_Fn, _Args...>(typename _Result::__invoke_type{})
2719 template<
typename _Fn,
typename... _Args>
2720 using __call_is_nothrow_
2721 = __call_is_nothrow<__invoke_result<_Fn, _Args...>, _Fn, _Args...>;
2724 template<
typename _Fn,
typename... _Args>
2725 struct __is_nothrow_invocable
2726 : __and_<__is_invocable<_Fn, _Args...>,
2727 __call_is_nothrow_<_Fn, _Args...>>::type
2731 __nonesuch() =
delete;
2732 ~__nonesuch() =
delete;
2733 __nonesuch(__nonesuch
const&) =
delete;
2734 void operator=(__nonesuch
const&) =
delete;
2737 #if __cplusplus >= 201703L
2738 # define __cpp_lib_is_invocable 201703
2741 template<
typename _Functor,
typename... _ArgTypes>
2742 struct invoke_result
2743 :
public __invoke_result<_Functor, _ArgTypes...>
2747 template<
typename _Fn,
typename... _Args>
2748 using invoke_result_t =
typename invoke_result<_Fn, _Args...>::type;
2751 template<
typename _Fn,
typename... _ArgTypes>
2753 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type
2757 template<
typename _Ret,
typename _Fn,
typename... _ArgTypes>
2758 struct is_invocable_r
2759 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>::type
2763 template<
typename _Fn,
typename... _ArgTypes>
2764 struct is_nothrow_invocable
2765 : __and_<__is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>,
2766 __call_is_nothrow_<_Fn, _ArgTypes...>>::type
2769 template<
typename _Result,
typename _Ret,
typename =
void>
2770 struct __is_nt_invocable_impl :
false_type { };
2772 template<
typename _Result,
typename _Ret>
2773 struct __is_nt_invocable_impl<_Result, _Ret,
2774 __void_t<typename _Result::type>>
2775 : __or_<is_void<_Ret>,
2776 __and_<is_convertible<typename _Result::type, _Ret>,
2777 is_nothrow_constructible<_Ret, typename _Result::type>>>
2781 template<
typename _Ret,
typename _Fn,
typename... _ArgTypes>
2782 struct is_nothrow_invocable_r
2783 : __and_<__is_nt_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>,
2784 __call_is_nothrow_<_Fn, _ArgTypes...>>::type
2788 template<
typename _Fn,
typename... _Args>
2789 inline constexpr
bool is_invocable_v = is_invocable<_Fn, _Args...>::value;
2792 template<
typename _Fn,
typename... _Args>
2793 inline constexpr
bool is_nothrow_invocable_v
2794 = is_nothrow_invocable<_Fn, _Args...>::value;
2797 template<
typename _Fn,
typename... _Args>
2798 inline constexpr
bool is_invocable_r_v
2799 = is_invocable_r<_Fn, _Args...>::value;
2802 template<
typename _Fn,
typename... _Args>
2803 inline constexpr
bool is_nothrow_invocable_r_v
2804 = is_nothrow_invocable_r<_Fn, _Args...>::value;
2807 #if __cplusplus >= 201703L
2808 # define __cpp_lib_type_trait_variable_templates 201510L
2809 template <
typename _Tp>
2810 inline constexpr
bool is_void_v = is_void<_Tp>::value;
2811 template <
typename _Tp>
2812 inline constexpr
bool is_null_pointer_v = is_null_pointer<_Tp>::value;
2813 template <
typename _Tp>
2814 inline constexpr
bool is_integral_v = is_integral<_Tp>::value;
2815 template <
typename _Tp>
2816 inline constexpr
bool is_floating_point_v = is_floating_point<_Tp>::value;
2817 template <
typename _Tp>
2818 inline constexpr
bool is_array_v = is_array<_Tp>::value;
2819 template <
typename _Tp>
2820 inline constexpr
bool is_pointer_v = is_pointer<_Tp>::value;
2821 template <
typename _Tp>
2822 inline constexpr
bool is_lvalue_reference_v =
2823 is_lvalue_reference<_Tp>::value;
2824 template <
typename _Tp>
2825 inline constexpr
bool is_rvalue_reference_v =
2826 is_rvalue_reference<_Tp>::value;
2827 template <
typename _Tp>
2828 inline constexpr
bool is_member_object_pointer_v =
2829 is_member_object_pointer<_Tp>::value;
2830 template <
typename _Tp>
2831 inline constexpr
bool is_member_function_pointer_v =
2832 is_member_function_pointer<_Tp>::value;
2833 template <
typename _Tp>
2834 inline constexpr
bool is_enum_v = is_enum<_Tp>::value;
2835 template <
typename _Tp>
2836 inline constexpr
bool is_union_v = is_union<_Tp>::value;
2837 template <
typename _Tp>
2838 inline constexpr
bool is_class_v = is_class<_Tp>::value;
2839 template <
typename _Tp>
2840 inline constexpr
bool is_function_v = is_function<_Tp>::value;
2841 template <
typename _Tp>
2842 inline constexpr
bool is_reference_v = is_reference<_Tp>::value;
2843 template <
typename _Tp>
2844 inline constexpr
bool is_arithmetic_v = is_arithmetic<_Tp>::value;
2845 template <
typename _Tp>
2846 inline constexpr
bool is_fundamental_v = is_fundamental<_Tp>::value;
2847 template <
typename _Tp>
2848 inline constexpr
bool is_object_v = is_object<_Tp>::value;
2849 template <
typename _Tp>
2850 inline constexpr
bool is_scalar_v = is_scalar<_Tp>::value;
2851 template <
typename _Tp>
2852 inline constexpr
bool is_compound_v = is_compound<_Tp>::value;
2853 template <
typename _Tp>
2854 inline constexpr
bool is_member_pointer_v = is_member_pointer<_Tp>::value;
2855 template <
typename _Tp>
2856 inline constexpr
bool is_const_v = is_const<_Tp>::value;
2857 template <
typename _Tp>
2858 inline constexpr
bool is_volatile_v = is_volatile<_Tp>::value;
2859 template <
typename _Tp>
2860 inline constexpr
bool is_trivial_v = is_trivial<_Tp>::value;
2861 template <
typename _Tp>
2862 inline constexpr
bool is_trivially_copyable_v =
2863 is_trivially_copyable<_Tp>::value;
2864 template <
typename _Tp>
2865 inline constexpr
bool is_standard_layout_v = is_standard_layout<_Tp>::value;
2866 template <
typename _Tp>
2867 inline constexpr
bool is_pod_v = is_pod<_Tp>::value;
2868 template <
typename _Tp>
2869 inline constexpr
bool is_literal_type_v = is_literal_type<_Tp>::value;
2870 template <
typename _Tp>
2871 inline constexpr
bool is_empty_v = is_empty<_Tp>::value;
2872 template <
typename _Tp>
2873 inline constexpr
bool is_polymorphic_v = is_polymorphic<_Tp>::value;
2874 template <
typename _Tp>
2875 inline constexpr
bool is_abstract_v = is_abstract<_Tp>::value;
2876 template <
typename _Tp>
2877 inline constexpr
bool is_final_v = is_final<_Tp>::value;
2878 template <
typename _Tp>
2879 inline constexpr
bool is_signed_v = is_signed<_Tp>::value;
2880 template <
typename _Tp>
2881 inline constexpr
bool is_unsigned_v = is_unsigned<_Tp>::value;
2882 template <
typename _Tp,
typename... _Args>
2883 inline constexpr
bool is_constructible_v =
2884 is_constructible<_Tp, _Args...>::value;
2885 template <
typename _Tp>
2886 inline constexpr
bool is_default_constructible_v =
2887 is_default_constructible<_Tp>::value;
2888 template <
typename _Tp>
2889 inline constexpr
bool is_copy_constructible_v =
2890 is_copy_constructible<_Tp>::value;
2891 template <
typename _Tp>
2892 inline constexpr
bool is_move_constructible_v =
2893 is_move_constructible<_Tp>::value;
2894 template <
typename _Tp,
typename _Up>
2895 inline constexpr
bool is_assignable_v = is_assignable<_Tp, _Up>::value;
2896 template <
typename _Tp>
2897 inline constexpr
bool is_copy_assignable_v = is_copy_assignable<_Tp>::value;
2898 template <
typename _Tp>
2899 inline constexpr
bool is_move_assignable_v = is_move_assignable<_Tp>::value;
2900 template <
typename _Tp>
2901 inline constexpr
bool is_destructible_v = is_destructible<_Tp>::value;
2902 template <
typename _Tp,
typename... _Args>
2903 inline constexpr
bool is_trivially_constructible_v =
2904 is_trivially_constructible<_Tp, _Args...>::value;
2905 template <
typename _Tp>
2906 inline constexpr
bool is_trivially_default_constructible_v =
2907 is_trivially_default_constructible<_Tp>::value;
2908 template <
typename _Tp>
2909 inline constexpr
bool is_trivially_copy_constructible_v =
2910 is_trivially_copy_constructible<_Tp>::value;
2911 template <
typename _Tp>
2912 inline constexpr
bool is_trivially_move_constructible_v =
2913 is_trivially_move_constructible<_Tp>::value;
2914 template <
typename _Tp,
typename _Up>
2915 inline constexpr
bool is_trivially_assignable_v =
2916 is_trivially_assignable<_Tp, _Up>::value;
2917 template <
typename _Tp>
2918 inline constexpr
bool is_trivially_copy_assignable_v =
2919 is_trivially_copy_assignable<_Tp>::value;
2920 template <
typename _Tp>
2921 inline constexpr
bool is_trivially_move_assignable_v =
2922 is_trivially_move_assignable<_Tp>::value;
2923 template <
typename _Tp>
2924 inline constexpr
bool is_trivially_destructible_v =
2925 is_trivially_destructible<_Tp>::value;
2926 template <
typename _Tp,
typename... _Args>
2927 inline constexpr
bool is_nothrow_constructible_v =
2928 is_nothrow_constructible<_Tp, _Args...>::value;
2929 template <
typename _Tp>
2930 inline constexpr
bool is_nothrow_default_constructible_v =
2931 is_nothrow_default_constructible<_Tp>::value;
2932 template <
typename _Tp>
2933 inline constexpr
bool is_nothrow_copy_constructible_v =
2934 is_nothrow_copy_constructible<_Tp>::value;
2935 template <
typename _Tp>
2936 inline constexpr
bool is_nothrow_move_constructible_v =
2937 is_nothrow_move_constructible<_Tp>::value;
2938 template <
typename _Tp,
typename _Up>
2939 inline constexpr
bool is_nothrow_assignable_v =
2940 is_nothrow_assignable<_Tp, _Up>::value;
2941 template <
typename _Tp>
2942 inline constexpr
bool is_nothrow_copy_assignable_v =
2943 is_nothrow_copy_assignable<_Tp>::value;
2944 template <
typename _Tp>
2945 inline constexpr
bool is_nothrow_move_assignable_v =
2946 is_nothrow_move_assignable<_Tp>::value;
2947 template <
typename _Tp>
2948 inline constexpr
bool is_nothrow_destructible_v =
2949 is_nothrow_destructible<_Tp>::value;
2950 template <
typename _Tp>
2951 inline constexpr
bool has_virtual_destructor_v =
2952 has_virtual_destructor<_Tp>::value;
2953 template <
typename _Tp>
2954 inline constexpr
size_t alignment_of_v = alignment_of<_Tp>::value;
2955 template <
typename _Tp>
2956 inline constexpr
size_t rank_v = rank<_Tp>::value;
2957 template <
typename _Tp,
unsigned _Idx = 0>
2958 inline constexpr
size_t extent_v = extent<_Tp, _Idx>::value;
2959 template <
typename _Tp,
typename _Up>
2960 inline constexpr
bool is_same_v = is_same<_Tp, _Up>::value;
2961 template <
typename _Base,
typename _Derived>
2962 inline constexpr
bool is_base_of_v = is_base_of<_Base, _Derived>::value;
2963 template <
typename _From,
typename _To>
2964 inline constexpr
bool is_convertible_v = is_convertible<_From, _To>::value;
2966 #ifdef _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP
2967 # define __cpp_lib_has_unique_object_representations 201606
2969 template<
typename _Tp>
2970 struct has_unique_object_representations
2971 : bool_constant<__has_unique_object_representations(
2972 remove_cv_t<remove_all_extents_t<_Tp>>
2976 template<
typename _Tp>
2977 inline constexpr
bool has_unique_object_representations_v
2978 = has_unique_object_representations<_Tp>::value;
2981 #ifdef _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE
2982 # define __cpp_lib_is_aggregate 201703
2984 template<
typename _Tp>
2986 : bool_constant<__is_aggregate(remove_cv_t<_Tp>)> { };
2989 template<
typename _Tp>
2990 inline constexpr
bool is_aggregate_v = is_aggregate<_Tp>::value;
2994 #if __cplusplus > 201703L
2998 little = __ORDER_LITTLE_ENDIAN__,
2999 big = __ORDER_BIG_ENDIAN__,
3000 native = __BYTE_ORDER__
3004 template<
typename _Tp>
3007 using type = __remove_cvref_t<_Tp>;
3010 template<
typename _Tp>
3011 using remove_cvref_t = __remove_cvref_t<_Tp>;
3014 template<
typename _Tp>
3015 struct type_identity {
using type = _Tp; };
3017 template<
typename _Tp>
3018 using type_identity_t =
typename type_identity<_Tp>::type;
3021 template<
typename _Tp>
3022 struct unwrap_reference {
using type = _Tp; };
3024 template<
typename _Tp>
3025 struct unwrap_reference<reference_wrapper<_Tp>> {
using type = _Tp&; };
3027 template<
typename _Tp>
3028 using unwrap_reference_t =
typename unwrap_reference<_Tp>::type;
3031 template<
typename _Tp>
3032 struct unwrap_ref_decay {
using type = unwrap_reference_t<decay_t<_Tp>>; };
3034 template<
typename _Tp>
3035 using unwrap_ref_decay_t =
typename unwrap_ref_decay<_Tp>::type;
3037 #define __cpp_lib_bounded_array_traits 201902L
3040 template<
typename _Tp>
3041 struct is_bounded_array
3042 :
public __is_array_known_bounds<_Tp>
3046 template<
typename _Tp>
3047 struct is_unbounded_array
3048 :
public __is_array_unknown_bounds<_Tp>
3051 template<
typename _Tp>
3052 inline constexpr
bool is_bounded_array_v
3053 = is_bounded_array<_Tp>::value;
3055 template<
typename _Tp>
3056 inline constexpr
bool is_unbounded_array_v
3057 = is_unbounded_array<_Tp>::value;
3059 #ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED
3061 #define __cpp_lib_is_constant_evaluated 201811L
3063 constexpr
inline bool
3065 {
return __builtin_is_constant_evaluated(); }
3070 _GLIBCXX_END_NAMESPACE_VERSION
3075 #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.
Provide aligned storage for types.
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.
is_nothrow_move_constructible
Implementation of the detection idiom (negative case).
typename add_volatile< _Tp >::type add_volatile_t
Alias template for add_volatile.
is_trivially_copy_assignable
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
is_trivially_default_constructible
Primary class template for reference_wrapper.
typename aligned_storage< _Len, _Align >::type aligned_storage_t
Alias template for aligned_storage.
is_nothrow_copy_constructible
_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.
typename underlying_type< _Tp >::type underlying_type_t
Alias template for underlying_type.
is_nothrow_move_assignable
typename remove_const< _Tp >::type remove_const_t
Alias template for remove_const.
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_nothrow_swappable_with
typename enable_if< _Cond, _Tp >::type enable_if_t
Alias template for enable_if.
is_trivially_constructible
_GLIBCXX17_INLINE constexpr bool is_nothrow_swappable_with_v
is_nothrow_swappable_with_v
is_nothrow_copy_assignable
typename make_signed< _Tp >::type make_signed_t
Alias template for make_signed.
enable_if< ::__array_traits< _Tp, _Nm >::_Is_swappable::value >::type noexcept(noexcept(__one.swap(__two)))
swap
typename common_type< _Tp...>::type common_type_t
Alias template for common_type.
Define a member typedef type only if a boolean constant is true.
aligned_storage< _S_len, alignment_value >::type type
The storage.
Metafunctions used for detecting swappable types: p0185r1.
is_member_function_pointer
is_trivially_move_assignable
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_nullptr_t (extension).
typename remove_pointer< _Tp >::type remove_pointer_t
Alias template for remove_pointer.
_GLIBCXX17_INLINE constexpr bool is_swappable_v
is_swappable_v
typename add_const< _Tp >::type add_const_t
Alias template for add_const.
is_trivially_move_constructible
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
is_trivially_copy_constructible
typename add_cv< _Tp >::type add_cv_t
Alias template for add_cv.
is_trivially_destructible
is_nothrow_default_constructible
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.
The underlying type of an enum.
Define a member typedef type to one of two argument types.
is_null_pointer (LWG 2247).