29 #ifndef _GLIBCXX_TYPE_TRAITS 30 #define _GLIBCXX_TYPE_TRAITS 1 32 #pragma GCC system_header 34 #if __cplusplus < 201103L 40 #ifdef _GLIBCXX_USE_C99_STDINT_TR1 41 # if defined (__UINT_LEAST16_TYPE__) && defined(__UINT_LEAST32_TYPE__) 44 typedef __UINT_LEAST16_TYPE__ uint_least16_t;
45 typedef __UINT_LEAST32_TYPE__ uint_least32_t;
52 namespace std _GLIBCXX_VISIBILITY(default)
54 _GLIBCXX_BEGIN_NAMESPACE_VERSION
68 template<
typename _Tp, _Tp __v>
71 static constexpr _Tp value = __v;
72 typedef _Tp value_type;
74 constexpr
operator value_type()
const {
return value; }
75 #if __cplusplus > 201103L 77 #define __cpp_lib_integral_constant_callable 201304 79 constexpr value_type operator()()
const {
return value; }
83 template<
typename _Tp, _Tp __v>
95 #if __cplusplus > 201402L 96 # define __cpp_lib_bool_constant 201505 103 template<
bool,
typename,
typename>
106 template<
typename...>
114 template<
typename _B1>
119 template<
typename _B1,
typename _B2>
120 struct __or_<_B1, _B2>
121 :
public conditional<_B1::value, _B1, _B2>::type
124 template<
typename _B1,
typename _B2,
typename _B3,
typename... _Bn>
125 struct __or_<_B1, _B2, _B3, _Bn...>
126 :
public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type
129 template<
typename...>
137 template<
typename _B1>
142 template<
typename _B1,
typename _B2>
143 struct __and_<_B1, _B2>
144 :
public conditional<_B1::value, _B2, _B1>::type
147 template<
typename _B1,
typename _B2,
typename _B3,
typename... _Bn>
148 struct __and_<_B1, _B2, _B3, _Bn...>
149 :
public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type
152 template<
typename _Pp>
157 #if __cplusplus > 201402L 159 #define __cpp_lib_logical_traits 201510 161 template<
typename... _Bn>
166 template<
typename... _Bn>
171 template<
typename _Pp>
176 template<
typename... _Bn>
177 constexpr
bool conjunction_v
178 = conjunction<_Bn...>::value;
180 template<
typename... _Bn>
181 constexpr
bool disjunction_v
182 = disjunction<_Bn...>::value;
184 template<
typename _Pp>
185 constexpr
bool negation_v
186 = negation<_Pp>::value;
195 template<
typename _Tp>
196 struct __success_type
197 {
typedef _Tp type; };
199 struct __failure_type
208 struct __is_void_helper
209 :
public false_type { };
212 struct __is_void_helper<void>
213 :
public true_type { };
216 template<
typename _Tp>
218 :
public __is_void_helper<typename remove_cv<_Tp>::type>
::type 222 struct __is_integral_helper
223 :
public false_type { };
226 struct __is_integral_helper<bool>
227 :
public true_type { };
230 struct __is_integral_helper<char>
231 :
public true_type { };
234 struct __is_integral_helper<signed char>
235 :
public true_type { };
238 struct __is_integral_helper<unsigned char>
239 :
public true_type { };
241 #ifdef _GLIBCXX_USE_WCHAR_T 243 struct __is_integral_helper<wchar_t>
244 :
public true_type { };
248 struct __is_integral_helper<char16_t>
249 :
public true_type { };
252 struct __is_integral_helper<char32_t>
253 :
public true_type { };
256 struct __is_integral_helper<short>
257 :
public true_type { };
260 struct __is_integral_helper<unsigned short>
261 :
public true_type { };
264 struct __is_integral_helper<int>
265 :
public true_type { };
268 struct __is_integral_helper<unsigned int>
269 :
public true_type { };
272 struct __is_integral_helper<long>
273 :
public true_type { };
276 struct __is_integral_helper<unsigned long>
277 :
public true_type { };
280 struct __is_integral_helper<long long>
281 :
public true_type { };
284 struct __is_integral_helper<unsigned long long>
285 :
public true_type { };
289 #if defined(__GLIBCXX_TYPE_INT_N_0) 291 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_0>
292 :
public true_type { };
295 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_0>
296 :
public true_type { };
298 #if defined(__GLIBCXX_TYPE_INT_N_1) 300 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_1>
301 :
public true_type { };
304 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_1>
305 :
public true_type { };
307 #if defined(__GLIBCXX_TYPE_INT_N_2) 309 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_2>
310 :
public true_type { };
313 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_2>
314 :
public true_type { };
316 #if defined(__GLIBCXX_TYPE_INT_N_3) 318 struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_3>
319 :
public true_type { };
322 struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_3>
323 :
public true_type { };
327 template<
typename _Tp>
329 :
public __is_integral_helper<typename remove_cv<_Tp>::type>
::type 333 struct __is_floating_point_helper
334 :
public false_type { };
337 struct __is_floating_point_helper<float>
338 :
public true_type { };
341 struct __is_floating_point_helper<double>
342 :
public true_type { };
345 struct __is_floating_point_helper<long double>
346 :
public true_type { };
348 #if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) 350 struct __is_floating_point_helper<__float128>
351 :
public true_type { };
355 template<
typename _Tp>
357 :
public __is_floating_point_helper<typename remove_cv<_Tp>::type>::type
363 :
public false_type { };
365 template<
typename _Tp, std::
size_t _Size>
367 :
public true_type { };
369 template<
typename _Tp>
371 :
public true_type { };
374 struct __is_pointer_helper
375 :
public false_type { };
377 template<
typename _Tp>
378 struct __is_pointer_helper<_Tp*>
379 :
public true_type { };
382 template<
typename _Tp>
384 :
public __is_pointer_helper<typename remove_cv<_Tp>::type>::type
390 :
public false_type { };
392 template<
typename _Tp>
394 :
public true_type { };
399 :
public false_type { };
401 template<
typename _Tp>
403 :
public true_type { };
409 struct __is_member_object_pointer_helper
410 :
public false_type { };
412 template<
typename _Tp,
typename _Cp>
413 struct __is_member_object_pointer_helper<_Tp _Cp::*>
417 template<
typename _Tp>
419 :
public __is_member_object_pointer_helper<
420 typename remove_cv<_Tp>::type>::type
424 struct __is_member_function_pointer_helper
425 :
public false_type { };
427 template<
typename _Tp,
typename _Cp>
428 struct __is_member_function_pointer_helper<_Tp _Cp::*>
432 template<
typename _Tp>
434 :
public __is_member_function_pointer_helper<
435 typename remove_cv<_Tp>::type>
::type 439 template<
typename _Tp>
445 template<
typename _Tp>
451 template<
typename _Tp>
459 :
public false_type { };
461 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
462 struct is_function<_Res(_ArgTypes...) _GLIBCXX_NOEXCEPT_QUAL>
463 :
public true_type { };
465 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
466 struct is_function<_Res(_ArgTypes...) & _GLIBCXX_NOEXCEPT_QUAL>
467 :
public true_type { };
469 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
470 struct is_function<_Res(_ArgTypes...) && _GLIBCXX_NOEXCEPT_QUAL>
471 :
public true_type { };
473 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
474 struct is_function<_Res(_ArgTypes......) _GLIBCXX_NOEXCEPT_QUAL>
475 :
public true_type { };
477 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
478 struct is_function<_Res(_ArgTypes......) & _GLIBCXX_NOEXCEPT_QUAL>
479 :
public true_type { };
481 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
482 struct is_function<_Res(_ArgTypes......) && _GLIBCXX_NOEXCEPT_QUAL>
483 :
public true_type { };
485 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
486 struct is_function<_Res(_ArgTypes...) const _GLIBCXX_NOEXCEPT_QUAL>
487 :
public true_type { };
489 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
490 struct is_function<_Res(_ArgTypes...) const & _GLIBCXX_NOEXCEPT_QUAL>
491 :
public true_type { };
493 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
494 struct is_function<_Res(_ArgTypes...) const && _GLIBCXX_NOEXCEPT_QUAL>
495 :
public true_type { };
497 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
498 struct is_function<_Res(_ArgTypes......) const _GLIBCXX_NOEXCEPT_QUAL>
499 :
public true_type { };
501 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
502 struct is_function<_Res(_ArgTypes......) const & _GLIBCXX_NOEXCEPT_QUAL>
503 :
public true_type { };
505 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
506 struct is_function<_Res(_ArgTypes......) const && _GLIBCXX_NOEXCEPT_QUAL>
507 :
public true_type { };
509 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
510 struct is_function<_Res(_ArgTypes...) volatile _GLIBCXX_NOEXCEPT_QUAL>
511 :
public true_type { };
513 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
514 struct is_function<_Res(_ArgTypes...) volatile & _GLIBCXX_NOEXCEPT_QUAL>
515 :
public true_type { };
517 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
518 struct is_function<_Res(_ArgTypes...) volatile && _GLIBCXX_NOEXCEPT_QUAL>
519 :
public true_type { };
521 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
522 struct is_function<_Res(_ArgTypes......) volatile _GLIBCXX_NOEXCEPT_QUAL>
523 :
public true_type { };
525 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
526 struct is_function<_Res(_ArgTypes......) volatile & _GLIBCXX_NOEXCEPT_QUAL>
527 :
public true_type { };
529 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
530 struct is_function<_Res(_ArgTypes......) volatile && _GLIBCXX_NOEXCEPT_QUAL>
531 :
public true_type { };
533 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
534 struct is_function<_Res(_ArgTypes...) const volatile _GLIBCXX_NOEXCEPT_QUAL>
535 :
public true_type { };
537 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
538 struct is_function<_Res(_ArgTypes...) const volatile & _GLIBCXX_NOEXCEPT_QUAL>
539 :
public true_type { };
541 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
542 struct is_function<_Res(_ArgTypes...) const volatile && _GLIBCXX_NOEXCEPT_QUAL>
543 :
public true_type { };
545 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
546 struct is_function<_Res(_ArgTypes......) const volatile _GLIBCXX_NOEXCEPT_QUAL>
547 :
public true_type { };
549 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
550 struct is_function<_Res(_ArgTypes......) const volatile & _GLIBCXX_NOEXCEPT_QUAL>
551 :
public true_type { };
553 template<
typename _Res,
typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM>
554 struct is_function<_Res(_ArgTypes......) const volatile && _GLIBCXX_NOEXCEPT_QUAL>
555 :
public true_type { };
557 #define __cpp_lib_is_null_pointer 201309 560 struct __is_null_pointer_helper
561 :
public false_type { };
564 struct __is_null_pointer_helper<std::nullptr_t>
565 :
public true_type { };
568 template<
typename _Tp>
570 :
public __is_null_pointer_helper<typename remove_cv<_Tp>::type>::type
574 template<
typename _Tp>
582 template<
typename _Tp>
584 :
public __or_<is_lvalue_reference<_Tp>,
585 is_rvalue_reference<_Tp>>::type
589 template<
typename _Tp>
591 :
public __or_<is_integral<_Tp>, is_floating_point<_Tp>>::type
595 template<
typename _Tp>
597 :
public __or_<is_arithmetic<_Tp>, is_void<_Tp>,
598 is_null_pointer<_Tp>>::type
602 template<
typename _Tp>
604 :
public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
612 template<
typename _Tp>
614 :
public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
615 is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type
619 template<
typename _Tp>
623 template<
typename _Tp>
624 struct __is_member_pointer_helper
625 :
public false_type { };
627 template<
typename _Tp,
typename _Cp>
628 struct __is_member_pointer_helper<_Tp _Cp::*>
629 :
public true_type { };
632 template<
typename _Tp>
634 :
public __is_member_pointer_helper<typename remove_cv<_Tp>::type>
::type 639 template<
typename _Tp>
640 struct __is_referenceable
641 :
public __or_<is_object<_Tp>, is_reference<_Tp>>
::type 644 template<
typename _Res,
typename... _Args _GLIBCXX_NOEXCEPT_PARM>
645 struct __is_referenceable<_Res(_Args...) _GLIBCXX_NOEXCEPT_QUAL>
649 template<
typename _Res,
typename... _Args _GLIBCXX_NOEXCEPT_PARM>
650 struct __is_referenceable<_Res(_Args......) _GLIBCXX_NOEXCEPT_QUAL>
659 :
public false_type { };
661 template<
typename _Tp>
663 :
public true_type { };
668 :
public false_type { };
670 template<
typename _Tp>
672 :
public true_type { };
675 template<
typename _Tp>
681 template<
typename _Tp>
682 struct is_trivially_copyable
687 template<
typename _Tp>
694 template<
typename _Tp>
700 template<
typename _Tp>
706 template<
typename _Tp>
712 template<
typename _Tp>
717 #if __cplusplus >= 201402L 718 #define __cpp_lib_is_final 201402L 720 template<
typename _Tp>
727 template<
typename _Tp>
732 template<
typename _Tp,
734 struct __is_signed_helper
735 :
public false_type { };
737 template<
typename _Tp>
738 struct __is_signed_helper<_Tp, true>
743 template<typename _Tp>
745 : public __is_signed_helper<_Tp>::type
749 template<typename _Tp>
751 : public __and_<is_arithmetic<_Tp>, __not_<is_signed<_Tp>>>
758 struct add_rvalue_reference;
764 template<typename _Tp>
765 typename add_rvalue_reference<_Tp>::type declval() noexcept;
767 template<typename, unsigned = 0>
771 struct remove_all_extents;
773 template<typename _Tp>
774 struct __is_array_known_bounds
775 : public integral_constant<bool, (extent<_Tp>::value > 0)>
778 template<
typename _Tp>
779 struct __is_array_unknown_bounds
780 :
public __and_<is_array<_Tp>, __not_<extent<_Tp>>>
788 struct __do_is_destructible_impl
790 template<
typename _Tp,
typename = decltype(declval<_Tp&>().~_Tp())>
791 static true_type __test(
int);
794 static false_type __test(...);
797 template<
typename _Tp>
798 struct __is_destructible_impl
799 :
public __do_is_destructible_impl
801 typedef decltype(__test<_Tp>(0))
type;
804 template<
typename _Tp,
805 bool = __or_<is_void<_Tp>,
806 __is_array_unknown_bounds<_Tp>,
809 struct __is_destructible_safe;
811 template<
typename _Tp>
812 struct __is_destructible_safe<_Tp, false, false>
813 :
public __is_destructible_impl<typename
814 remove_all_extents<_Tp>::type>
::type 817 template<
typename _Tp>
818 struct __is_destructible_safe<_Tp, true, false>
819 :
public false_type { };
821 template<
typename _Tp>
822 struct __is_destructible_safe<_Tp, false, true>
823 :
public true_type { };
826 template<
typename _Tp>
827 struct is_destructible
828 :
public __is_destructible_safe<_Tp>
::type 835 struct __do_is_nt_destructible_impl
837 template<
typename _Tp>
842 static false_type __test(...);
845 template<
typename _Tp>
846 struct __is_nt_destructible_impl
847 :
public __do_is_nt_destructible_impl
849 typedef decltype(__test<_Tp>(0))
type;
852 template<
typename _Tp,
853 bool = __or_<is_void<_Tp>,
854 __is_array_unknown_bounds<_Tp>,
857 struct __is_nt_destructible_safe;
859 template<
typename _Tp>
860 struct __is_nt_destructible_safe<_Tp, false, false>
861 :
public __is_nt_destructible_impl<typename
862 remove_all_extents<_Tp>::type>
::type 865 template<
typename _Tp>
866 struct __is_nt_destructible_safe<_Tp, true, false>
867 :
public false_type { };
869 template<
typename _Tp>
870 struct __is_nt_destructible_safe<_Tp, false, true>
871 :
public true_type { };
874 template<
typename _Tp>
875 struct is_nothrow_destructible
876 :
public __is_nt_destructible_safe<_Tp>
::type 879 struct __do_is_default_constructible_impl
881 template<
typename _Tp,
typename = decltype(_Tp())>
882 static true_type __test(
int);
885 static false_type __test(...);
888 template<
typename _Tp>
889 struct __is_default_constructible_impl
890 :
public __do_is_default_constructible_impl
892 typedef decltype(__test<_Tp>(0))
type;
895 template<
typename _Tp>
896 struct __is_default_constructible_atom
897 :
public __and_<__not_<is_void<_Tp>>,
898 __is_default_constructible_impl<_Tp>>
901 template<typename _Tp, bool = is_array<_Tp>::value>
902 struct __is_default_constructible_safe;
909 template<
typename _Tp>
910 struct __is_default_constructible_safe<_Tp, true>
911 :
public __and_<__is_array_known_bounds<_Tp>,
912 __is_default_constructible_atom<typename
913 remove_all_extents<_Tp>::type>>
916 template<
typename _Tp>
917 struct __is_default_constructible_safe<_Tp, false>
918 :
public __is_default_constructible_atom<_Tp>
::type 922 template<
typename _Tp>
923 struct is_default_constructible
924 :
public __is_default_constructible_safe<_Tp>
::type 939 struct __do_is_static_castable_impl
941 template<
typename _From,
typename _To,
typename 942 = decltype(static_cast<_To>(declval<_From>()))>
943 static true_type __test(
int);
945 template<
typename,
typename>
946 static false_type __test(...);
949 template<
typename _From,
typename _To>
950 struct __is_static_castable_impl
951 :
public __do_is_static_castable_impl
953 typedef decltype(__test<_From, _To>(0))
type;
956 template<
typename _From,
typename _To>
957 struct __is_static_castable_safe
958 :
public __is_static_castable_impl<_From, _To>
::type 962 template<
typename _From,
typename _To>
963 struct __is_static_castable
973 struct __do_is_direct_constructible_impl
975 template<
typename _Tp,
typename _Arg,
typename 976 = decltype(::
new _Tp(declval<_Arg>()))>
977 static true_type __test(
int);
979 template<
typename,
typename>
980 static false_type __test(...);
983 template<
typename _Tp,
typename _Arg>
984 struct __is_direct_constructible_impl
985 :
public __do_is_direct_constructible_impl
987 typedef decltype(__test<_Tp, _Arg>(0))
type;
990 template<
typename _Tp,
typename _Arg>
991 struct __is_direct_constructible_new_safe
992 :
public __and_<is_destructible<_Tp>,
993 __is_direct_constructible_impl<_Tp, _Arg>>
996 template<
typename,
typename>
999 template<
typename,
typename>
1003 struct remove_reference;
1005 template<
typename _From,
typename _To,
bool 1006 = __not_<__or_<is_void<_From>,
1008 struct __is_base_to_derived_ref;
1010 template<
typename _Tp,
typename... _Args>
1011 struct is_constructible;
1015 template<
typename _From,
typename _To>
1016 struct __is_base_to_derived_ref<_From, _To, true>
1018 typedef typename remove_cv<
typename remove_reference<_From
1020 typedef typename remove_cv<
typename remove_reference<_To
1022 typedef __and_<__not_<is_same<__src_t, __dst_t>>,
1023 is_base_of<__src_t, __dst_t>,
1024 __not_<is_constructible<__dst_t, _From>>>
type;
1025 static constexpr
bool value = type::value;
1028 template<
typename _From,
typename _To>
1029 struct __is_base_to_derived_ref<_From, _To, false>
1033 template<
typename _From,
typename _To,
bool 1034 = __and_<is_lvalue_reference<_From>,
1036 struct __is_lvalue_to_rvalue_ref;
1040 template<
typename _From,
typename _To>
1041 struct __is_lvalue_to_rvalue_ref<_From, _To, true>
1043 typedef typename remove_cv<
typename remove_reference<
1045 typedef typename remove_cv<
typename remove_reference<
1047 typedef __and_<__not_<is_function<__src_t>>,
1048 __or_<is_same<__src_t, __dst_t>,
1049 is_base_of<__dst_t, __src_t>>>
type;
1050 static constexpr
bool value = type::value;
1053 template<
typename _From,
typename _To>
1054 struct __is_lvalue_to_rvalue_ref<_From, _To, false>
1064 template<
typename _Tp,
typename _Arg>
1065 struct __is_direct_constructible_ref_cast
1066 :
public __and_<__is_static_castable<_Arg, _Tp>,
1067 __not_<__or_<__is_base_to_derived_ref<_Arg, _Tp>,
1068 __is_lvalue_to_rvalue_ref<_Arg, _Tp>
1072 template<
typename _Tp,
typename _Arg>
1073 struct __is_direct_constructible_new
1074 :
public conditional<is_reference<_Tp>::value,
1075 __is_direct_constructible_ref_cast<_Tp, _Arg>,
1076 __is_direct_constructible_new_safe<_Tp, _Arg>
1080 template<
typename _Tp,
typename _Arg>
1081 struct __is_direct_constructible
1082 :
public __is_direct_constructible_new<_Tp, _Arg>
::type 1090 struct __do_is_nary_constructible_impl
1092 template<
typename _Tp,
typename... _Args,
typename 1093 = decltype(_Tp(declval<_Args>()...))>
1094 static true_type __test(
int);
1096 template<
typename,
typename...>
1097 static false_type __test(...);
1100 template<
typename _Tp,
typename... _Args>
1101 struct __is_nary_constructible_impl
1102 :
public __do_is_nary_constructible_impl
1104 typedef decltype(__test<_Tp, _Args...>(0))
type;
1107 template<
typename _Tp,
typename... _Args>
1108 struct __is_nary_constructible
1109 :
public __is_nary_constructible_impl<_Tp, _Args...>
::type 1111 static_assert(
sizeof...(_Args) > 1,
1112 "Only useful for > 1 arguments");
1115 template<
typename _Tp,
typename... _Args>
1116 struct __is_constructible_impl
1117 :
public __is_nary_constructible<_Tp, _Args...>
1120 template<
typename _Tp,
typename _Arg>
1121 struct __is_constructible_impl<_Tp, _Arg>
1122 :
public __is_direct_constructible<_Tp, _Arg>
1125 template<
typename _Tp>
1126 struct __is_constructible_impl<_Tp>
1127 :
public is_default_constructible<_Tp>
1131 template<
typename _Tp,
typename... _Args>
1132 struct is_constructible
1133 :
public __is_constructible_impl<_Tp, _Args...>
::type 1136 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1137 struct __is_copy_constructible_impl;
1139 template<
typename _Tp>
1140 struct __is_copy_constructible_impl<_Tp, false>
1141 :
public false_type { };
1143 template<
typename _Tp>
1144 struct __is_copy_constructible_impl<_Tp, true>
1145 :
public is_constructible<_Tp, const _Tp&>
1149 template<
typename _Tp>
1150 struct is_copy_constructible
1151 :
public __is_copy_constructible_impl<_Tp>
1154 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1155 struct __is_move_constructible_impl;
1157 template<
typename _Tp>
1158 struct __is_move_constructible_impl<_Tp, false>
1159 :
public false_type { };
1161 template<
typename _Tp>
1162 struct __is_move_constructible_impl<_Tp, true>
1163 :
public is_constructible<_Tp, _Tp&&>
1167 template<
typename _Tp>
1168 struct is_move_constructible
1169 :
public __is_move_constructible_impl<_Tp>
1172 template<
typename _Tp>
1173 struct __is_nt_default_constructible_atom
1177 template<typename _Tp, bool = is_array<_Tp>::value>
1178 struct __is_nt_default_constructible_impl;
1180 template<
typename _Tp>
1181 struct __is_nt_default_constructible_impl<_Tp, true>
1182 :
public __and_<__is_array_known_bounds<_Tp>,
1183 __is_nt_default_constructible_atom<typename
1184 remove_all_extents<_Tp>::type>>
1187 template<
typename _Tp>
1188 struct __is_nt_default_constructible_impl<_Tp, false>
1189 :
public __is_nt_default_constructible_atom<_Tp>
1193 template<
typename _Tp>
1194 struct is_nothrow_default_constructible
1195 :
public __and_<is_default_constructible<_Tp>,
1196 __is_nt_default_constructible_impl<_Tp>>
1199 template<
typename _Tp,
typename... _Args>
1200 struct __is_nt_constructible_impl
1204 template<
typename _Tp,
typename _Arg>
1205 struct __is_nt_constructible_impl<_Tp, _Arg>
1207 noexcept(static_cast<_Tp>(declval<_Arg>()))>
1210 template<
typename _Tp>
1211 struct __is_nt_constructible_impl<_Tp>
1212 :
public is_nothrow_default_constructible<_Tp>
1216 template<
typename _Tp,
typename... _Args>
1217 struct is_nothrow_constructible
1218 :
public __and_<is_constructible<_Tp, _Args...>,
1219 __is_nt_constructible_impl<_Tp, _Args...>>
1222 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1223 struct __is_nothrow_copy_constructible_impl;
1225 template<
typename _Tp>
1226 struct __is_nothrow_copy_constructible_impl<_Tp, false>
1227 :
public false_type { };
1229 template<
typename _Tp>
1230 struct __is_nothrow_copy_constructible_impl<_Tp, true>
1231 :
public is_nothrow_constructible<_Tp, const _Tp&>
1235 template<
typename _Tp>
1236 struct is_nothrow_copy_constructible
1237 :
public __is_nothrow_copy_constructible_impl<_Tp>
1240 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1241 struct __is_nothrow_move_constructible_impl;
1243 template<
typename _Tp>
1244 struct __is_nothrow_move_constructible_impl<_Tp, false>
1245 :
public false_type { };
1247 template<
typename _Tp>
1248 struct __is_nothrow_move_constructible_impl<_Tp, true>
1249 :
public is_nothrow_constructible<_Tp, _Tp&&>
1253 template<
typename _Tp>
1254 struct is_nothrow_move_constructible
1255 :
public __is_nothrow_move_constructible_impl<_Tp>
1258 template<
typename _Tp,
typename _Up>
1259 class __is_assignable_helper
1261 template<
typename _Tp1,
typename _Up1,
1262 typename = decltype(declval<_Tp1>() = declval<_Up1>())>
1266 template<
typename,
typename>
1271 typedef decltype(__test<_Tp, _Up>(0))
type;
1275 template<
typename _Tp,
typename _Up>
1276 struct is_assignable
1277 :
public __is_assignable_helper<_Tp, _Up>
::type 1280 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1281 struct __is_copy_assignable_impl;
1283 template<
typename _Tp>
1284 struct __is_copy_assignable_impl<_Tp, false>
1285 :
public false_type { };
1287 template<
typename _Tp>
1288 struct __is_copy_assignable_impl<_Tp, true>
1289 :
public is_assignable<_Tp&, const _Tp&>
1293 template<
typename _Tp>
1294 struct is_copy_assignable
1295 :
public __is_copy_assignable_impl<_Tp>
1298 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1299 struct __is_move_assignable_impl;
1301 template<
typename _Tp>
1302 struct __is_move_assignable_impl<_Tp, false>
1303 :
public false_type { };
1305 template<
typename _Tp>
1306 struct __is_move_assignable_impl<_Tp, true>
1307 :
public is_assignable<_Tp&, _Tp&&>
1311 template<
typename _Tp>
1312 struct is_move_assignable
1313 :
public __is_move_assignable_impl<_Tp>
1316 template<
typename _Tp,
typename _Up>
1317 struct __is_nt_assignable_impl
1322 template<
typename _Tp,
typename _Up>
1323 struct is_nothrow_assignable
1324 :
public __and_<is_assignable<_Tp, _Up>,
1325 __is_nt_assignable_impl<_Tp, _Up>>
1328 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1329 struct __is_nt_copy_assignable_impl;
1331 template<
typename _Tp>
1332 struct __is_nt_copy_assignable_impl<_Tp, false>
1333 :
public false_type { };
1335 template<
typename _Tp>
1336 struct __is_nt_copy_assignable_impl<_Tp, true>
1337 :
public is_nothrow_assignable<_Tp&, const _Tp&>
1341 template<
typename _Tp>
1342 struct is_nothrow_copy_assignable
1343 :
public __is_nt_copy_assignable_impl<_Tp>
1346 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1347 struct __is_nt_move_assignable_impl;
1349 template<
typename _Tp>
1350 struct __is_nt_move_assignable_impl<_Tp, false>
1351 :
public false_type { };
1353 template<
typename _Tp>
1354 struct __is_nt_move_assignable_impl<_Tp, true>
1355 :
public is_nothrow_assignable<_Tp&, _Tp&&>
1359 template<
typename _Tp>
1360 struct is_nothrow_move_assignable
1361 :
public __is_nt_move_assignable_impl<_Tp>
1365 template<
typename _Tp,
typename... _Args>
1366 struct is_trivially_constructible
1367 :
public __and_<is_constructible<_Tp, _Args...>, integral_constant<bool,
1368 __is_trivially_constructible(_Tp, _Args...)>>
1372 template<
typename _Tp>
1373 struct is_trivially_default_constructible
1374 :
public is_trivially_constructible<_Tp>
::type 1377 struct __do_is_implicitly_default_constructible_impl
1379 template <
typename _Tp>
1380 static void __helper(
const _Tp&);
1382 template <
typename _Tp>
1383 static true_type __test(
const _Tp&,
1384 decltype(__helper<const _Tp&>({}))* = 0);
1386 static false_type __test(...);
1389 template<
typename _Tp>
1390 struct __is_implicitly_default_constructible_impl
1391 :
public __do_is_implicitly_default_constructible_impl
1393 typedef decltype(__test(declval<_Tp>()))
type;
1396 template<
typename _Tp>
1397 struct __is_implicitly_default_constructible_safe
1398 :
public __is_implicitly_default_constructible_impl<_Tp>
::type 1401 template <
typename _Tp>
1402 struct __is_implicitly_default_constructible
1403 :
public __and_<is_default_constructible<_Tp>,
1404 __is_implicitly_default_constructible_safe<_Tp>>
1408 template<
typename _Tp>
1409 struct is_trivially_copy_constructible
1410 :
public __and_<is_copy_constructible<_Tp>,
1411 integral_constant<bool,
1412 __is_trivially_constructible(_Tp, const _Tp&)>>
1416 template<
typename _Tp>
1417 struct is_trivially_move_constructible
1418 :
public __and_<is_move_constructible<_Tp>,
1419 integral_constant<bool,
1420 __is_trivially_constructible(_Tp, _Tp&&)>>
1424 template<
typename _Tp,
typename _Up>
1425 struct is_trivially_assignable
1426 :
public __and_<is_assignable<_Tp, _Up>,
1427 integral_constant<bool,
1428 __is_trivially_assignable(_Tp, _Up)>>
1432 template<
typename _Tp>
1433 struct is_trivially_copy_assignable
1434 :
public __and_<is_copy_assignable<_Tp>,
1435 integral_constant<bool,
1436 __is_trivially_assignable(_Tp&, const _Tp&)>>
1440 template<
typename _Tp>
1441 struct is_trivially_move_assignable
1442 :
public __and_<is_move_assignable<_Tp>,
1443 integral_constant<bool,
1444 __is_trivially_assignable(_Tp&, _Tp&&)>>
1448 template<
typename _Tp>
1449 struct is_trivially_destructible
1450 :
public __and_<is_destructible<_Tp>, integral_constant<bool,
1451 __has_trivial_destructor(_Tp)>>
1456 template<
typename _Tp>
1457 struct has_virtual_destructor
1465 template<
typename _Tp>
1474 template<
typename _Tp, std::
size_t _Size>
1475 struct rank<_Tp[_Size]>
1478 template<
typename _Tp>
1483 template<
typename,
unsigned _U
int>
1487 template<
typename _Tp,
unsigned _U
int, std::
size_t _Size>
1488 struct extent<_Tp[_Size], _Uint>
1490 _Uint == 0 ? _Size : extent<_Tp,
1494 template<
typename _Tp,
unsigned _U
int>
1495 struct extent<_Tp[], _Uint>
1497 _Uint == 0 ? 0 : extent<_Tp,
1505 template<
typename,
typename>
1507 :
public false_type { };
1509 template<
typename _Tp>
1510 struct is_same<_Tp, _Tp>
1511 :
public true_type { };
1514 template<
typename _Base,
typename _Derived>
1519 template<
typename _From,
typename _To,
1522 struct __is_convertible_helper
1525 template<
typename _From,
typename _To>
1526 class __is_convertible_helper<_From, _To, false>
1528 template<
typename _To1>
1529 static void __test_aux(_To1);
1531 template<
typename _From1,
typename _To1,
1532 typename = decltype(__test_aux<_To1>(std::declval<_From1>()))>
1536 template<
typename,
typename>
1541 typedef decltype(__test<_From, _To>(0))
type;
1546 template<
typename _From,
typename _To>
1547 struct is_convertible
1548 :
public __is_convertible_helper<_From, _To>
::type 1555 template<
typename _Tp>
1557 {
typedef _Tp
type; };
1559 template<
typename _Tp>
1560 struct remove_const<_Tp const>
1561 {
typedef _Tp
type; };
1564 template<
typename _Tp>
1565 struct remove_volatile
1566 {
typedef _Tp
type; };
1568 template<
typename _Tp>
1569 struct remove_volatile<_Tp volatile>
1570 {
typedef _Tp
type; };
1573 template<
typename _Tp>
1577 remove_const<typename remove_volatile<_Tp>::type>
::type type;
1581 template<
typename _Tp>
1583 {
typedef _Tp
const type; };
1586 template<
typename _Tp>
1588 {
typedef _Tp
volatile type; };
1591 template<
typename _Tp>
1595 add_const<typename add_volatile<_Tp>::type>
::type type;
1598 #if __cplusplus > 201103L 1600 #define __cpp_lib_transformation_trait_aliases 201304 1603 template<
typename _Tp>
1604 using remove_const_t =
typename remove_const<_Tp>::type;
1607 template<
typename _Tp>
1608 using remove_volatile_t =
typename remove_volatile<_Tp>::type;
1611 template<
typename _Tp>
1612 using remove_cv_t =
typename remove_cv<_Tp>::type;
1615 template<
typename _Tp>
1616 using add_const_t =
typename add_const<_Tp>::type;
1619 template<
typename _Tp>
1620 using add_volatile_t =
typename add_volatile<_Tp>::type;
1623 template<
typename _Tp>
1624 using add_cv_t =
typename add_cv<_Tp>::type;
1630 template<
typename _Tp>
1631 struct remove_reference
1632 {
typedef _Tp
type; };
1634 template<
typename _Tp>
1635 struct remove_reference<_Tp&>
1636 {
typedef _Tp
type; };
1638 template<
typename _Tp>
1639 struct remove_reference<_Tp&&>
1640 {
typedef _Tp
type; };
1642 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1643 struct __add_lvalue_reference_helper
1644 {
typedef _Tp
type; };
1646 template<
typename _Tp>
1647 struct __add_lvalue_reference_helper<_Tp, true>
1648 {
typedef _Tp&
type; };
1651 template<
typename _Tp>
1652 struct add_lvalue_reference
1653 :
public __add_lvalue_reference_helper<_Tp>
1656 template<typename _Tp, bool = __is_referenceable<_Tp>::value>
1657 struct __add_rvalue_reference_helper
1658 {
typedef _Tp
type; };
1660 template<
typename _Tp>
1661 struct __add_rvalue_reference_helper<_Tp, true>
1662 {
typedef _Tp&&
type; };
1665 template<
typename _Tp>
1666 struct add_rvalue_reference
1667 :
public __add_rvalue_reference_helper<_Tp>
1670 #if __cplusplus > 201103L 1672 template<
typename _Tp>
1673 using remove_reference_t =
typename remove_reference<_Tp>::type;
1676 template<
typename _Tp>
1677 using add_lvalue_reference_t =
typename add_lvalue_reference<_Tp>::type;
1680 template<
typename _Tp>
1681 using add_rvalue_reference_t =
typename add_rvalue_reference<_Tp>::type;
1687 template<
typename _Unqualified,
bool _IsConst,
bool _IsVol>
1688 struct __cv_selector;
1690 template<
typename _Unqualified>
1691 struct __cv_selector<_Unqualified, false, false>
1692 {
typedef _Unqualified __type; };
1694 template<
typename _Unqualified>
1695 struct __cv_selector<_Unqualified, false, true>
1696 {
typedef volatile _Unqualified __type; };
1698 template<
typename _Unqualified>
1699 struct __cv_selector<_Unqualified, true, false>
1700 {
typedef const _Unqualified __type; };
1702 template<
typename _Unqualified>
1703 struct __cv_selector<_Unqualified, true, true>
1704 {
typedef const volatile _Unqualified __type; };
1706 template<
typename _Qualified,
typename _Unqualified,
1709 class __match_cv_qualifiers
1711 typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match;
1714 typedef typename __match::__type __type;
1718 template<
typename _Tp>
1719 struct __make_unsigned
1720 {
typedef _Tp __type; };
1723 struct __make_unsigned<char>
1724 {
typedef unsigned char __type; };
1727 struct __make_unsigned<signed char>
1728 {
typedef unsigned char __type; };
1731 struct __make_unsigned<short>
1732 {
typedef unsigned short __type; };
1735 struct __make_unsigned<int>
1736 {
typedef unsigned int __type; };
1739 struct __make_unsigned<long>
1740 {
typedef unsigned long __type; };
1743 struct __make_unsigned<long long>
1744 {
typedef unsigned long long __type; };
1746 #if defined(_GLIBCXX_USE_WCHAR_T) && !defined(__WCHAR_UNSIGNED__) 1748 struct __make_unsigned<wchar_t> : __make_unsigned<__WCHAR_TYPE__>
1752 #if defined(__GLIBCXX_TYPE_INT_N_0) 1754 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_0>
1755 {
typedef unsigned __GLIBCXX_TYPE_INT_N_0 __type; };
1757 #if defined(__GLIBCXX_TYPE_INT_N_1) 1759 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_1>
1760 {
typedef unsigned __GLIBCXX_TYPE_INT_N_1 __type; };
1762 #if defined(__GLIBCXX_TYPE_INT_N_2) 1764 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_2>
1765 {
typedef unsigned __GLIBCXX_TYPE_INT_N_2 __type; };
1767 #if defined(__GLIBCXX_TYPE_INT_N_3) 1769 struct __make_unsigned<__GLIBCXX_TYPE_INT_N_3>
1770 {
typedef unsigned __GLIBCXX_TYPE_INT_N_3 __type; };
1774 template<
typename _Tp,
1777 class __make_unsigned_selector;
1779 template<
typename _Tp>
1780 class __make_unsigned_selector<_Tp, true, false>
1782 typedef __make_unsigned<typename remove_cv<_Tp>::type> __unsignedt;
1783 typedef typename __unsignedt::__type __unsigned_type;
1784 typedef __match_cv_qualifiers<_Tp, __unsigned_type> __cv_unsigned;
1787 typedef typename __cv_unsigned::__type __type;
1790 template<
typename _Tp>
1791 class __make_unsigned_selector<_Tp, false, true>
1794 typedef unsigned char __smallest;
1795 static const bool __b0 =
sizeof(_Tp) <=
sizeof(__smallest);
1796 static const bool __b1 =
sizeof(_Tp) <=
sizeof(
unsigned short);
1797 static const bool __b2 =
sizeof(_Tp) <=
sizeof(
unsigned int);
1798 static const bool __b3 =
sizeof(_Tp) <=
sizeof(
unsigned long);
1799 typedef conditional<__b3, unsigned long, unsigned long long> __cond3;
1800 typedef typename __cond3::type __cond3_type;
1801 typedef conditional<__b2, unsigned int, __cond3_type> __cond2;
1802 typedef typename __cond2::type __cond2_type;
1803 typedef conditional<__b1, unsigned short, __cond2_type> __cond1;
1804 typedef typename __cond1::type __cond1_type;
1806 typedef typename conditional<__b0, __smallest, __cond1_type>::type
1808 typedef __match_cv_qualifiers<_Tp, __unsigned_type> __cv_unsigned;
1811 typedef typename __cv_unsigned::__type __type;
1818 template<
typename _Tp>
1819 struct make_unsigned
1820 {
typedef typename __make_unsigned_selector<_Tp>::__type
type; };
1824 struct make_unsigned<bool>;
1828 template<
typename _Tp>
1829 struct __make_signed
1830 {
typedef _Tp __type; };
1833 struct __make_signed<char>
1834 {
typedef signed char __type; };
1837 struct __make_signed<unsigned char>
1838 {
typedef signed char __type; };
1841 struct __make_signed<unsigned short>
1842 {
typedef signed short __type; };
1845 struct __make_signed<unsigned int>
1846 {
typedef signed int __type; };
1849 struct __make_signed<unsigned long>
1850 {
typedef signed long __type; };
1853 struct __make_signed<unsigned long long>
1854 {
typedef signed long long __type; };
1856 #if defined(_GLIBCXX_USE_WCHAR_T) && defined(__WCHAR_UNSIGNED__) 1858 struct __make_signed<wchar_t> : __make_signed<__WCHAR_TYPE__>
1862 #ifdef _GLIBCXX_USE_C99_STDINT_TR1 1864 struct __make_signed<char16_t> : __make_signed<uint_least16_t>
1867 struct __make_signed<char32_t> : __make_signed<uint_least32_t>
1871 #if defined(__GLIBCXX_TYPE_INT_N_0) 1873 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_0>
1874 {
typedef __GLIBCXX_TYPE_INT_N_0 __type; };
1876 #if defined(__GLIBCXX_TYPE_INT_N_1) 1878 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_1>
1879 {
typedef __GLIBCXX_TYPE_INT_N_1 __type; };
1881 #if defined(__GLIBCXX_TYPE_INT_N_2) 1883 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_2>
1884 {
typedef __GLIBCXX_TYPE_INT_N_2 __type; };
1886 #if defined(__GLIBCXX_TYPE_INT_N_3) 1888 struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_3>
1889 {
typedef __GLIBCXX_TYPE_INT_N_3 __type; };
1893 template<
typename _Tp,
1896 class __make_signed_selector;
1898 template<
typename _Tp>
1899 class __make_signed_selector<_Tp, true, false>
1901 typedef __make_signed<typename remove_cv<_Tp>::type> __signedt;
1902 typedef typename __signedt::__type __signed_type;
1903 typedef __match_cv_qualifiers<_Tp, __signed_type> __cv_signed;
1906 typedef typename __cv_signed::__type __type;
1909 template<
typename _Tp>
1910 class __make_signed_selector<_Tp, false, true>
1912 typedef typename __make_unsigned_selector<_Tp>::__type __unsigned_type;
1915 typedef typename __make_signed_selector<__unsigned_type>::__type __type;
1922 template<
typename _Tp>
1924 {
typedef typename __make_signed_selector<_Tp>::__type
type; };
1928 struct make_signed<bool>;
1930 #if __cplusplus > 201103L 1932 template<
typename _Tp>
1933 using make_signed_t =
typename make_signed<_Tp>::type;
1936 template<
typename _Tp>
1937 using make_unsigned_t =
typename make_unsigned<_Tp>::type;
1943 template<
typename _Tp>
1944 struct remove_extent
1945 {
typedef _Tp
type; };
1947 template<
typename _Tp, std::
size_t _Size>
1948 struct remove_extent<_Tp[_Size]>
1949 {
typedef _Tp
type; };
1951 template<
typename _Tp>
1952 struct remove_extent<_Tp[]>
1953 {
typedef _Tp
type; };
1956 template<
typename _Tp>
1957 struct remove_all_extents
1958 {
typedef _Tp
type; };
1960 template<
typename _Tp, std::
size_t _Size>
1961 struct remove_all_extents<_Tp[_Size]>
1962 {
typedef typename remove_all_extents<_Tp>::type
type; };
1964 template<
typename _Tp>
1965 struct remove_all_extents<_Tp[]>
1966 {
typedef typename remove_all_extents<_Tp>::type
type; };
1968 #if __cplusplus > 201103L 1970 template<
typename _Tp>
1971 using remove_extent_t =
typename remove_extent<_Tp>::type;
1974 template<
typename _Tp>
1975 using remove_all_extents_t =
typename remove_all_extents<_Tp>::type;
1980 template<
typename _Tp,
typename>
1981 struct __remove_pointer_helper
1982 {
typedef _Tp
type; };
1984 template<
typename _Tp,
typename _Up>
1985 struct __remove_pointer_helper<_Tp, _Up*>
1986 {
typedef _Up
type; };
1989 template<
typename _Tp>
1990 struct remove_pointer
1991 :
public __remove_pointer_helper<_Tp, typename remove_cv<_Tp>::type>
1995 template<
typename _Tp,
bool = __or_<__is_referenceable<_Tp>,
1996 is_
void<_Tp>>::value>
1997 struct __add_pointer_helper
1998 {
typedef _Tp
type; };
2000 template<
typename _Tp>
2001 struct __add_pointer_helper<_Tp, true>
2002 {
typedef typename remove_reference<_Tp>::type*
type; };
2004 template<
typename _Tp>
2006 :
public __add_pointer_helper<_Tp>
2009 #if __cplusplus > 201103L 2011 template<
typename _Tp>
2012 using remove_pointer_t =
typename remove_pointer<_Tp>::type;
2015 template<
typename _Tp>
2016 using add_pointer_t =
typename add_pointer<_Tp>::type;
2019 template<std::
size_t _Len>
2020 struct __aligned_storage_msa
2024 unsigned char __data[_Len];
2025 struct __attribute__((__aligned__)) { } __align;
2039 template<std::size_t _Len, std::size_t _Align =
2040 __alignof__(
typename __aligned_storage_msa<_Len>::__type)>
2041 struct aligned_storage
2045 unsigned char __data[_Len];
2046 struct __attribute__((__aligned__((_Align)))) { } __align;
2050 template <
typename... _Types>
2051 struct __strictest_alignment
2053 static const size_t _S_alignment = 0;
2054 static const size_t _S_size = 0;
2057 template <
typename _Tp,
typename... _Types>
2058 struct __strictest_alignment<_Tp, _Types...>
2060 static const size_t _S_alignment =
2061 alignof(_Tp) > __strictest_alignment<_Types...>::_S_alignment
2062 ?
alignof(_Tp) : __strictest_alignment<_Types...>::_S_alignment;
2063 static const size_t _S_size =
2064 sizeof(_Tp) > __strictest_alignment<_Types...>::_S_size
2065 ?
sizeof(_Tp) : __strictest_alignment<_Types...>::_S_size;
2078 template <
size_t _Len,
typename... _Types>
2079 struct aligned_union
2082 static_assert(
sizeof...(_Types) != 0,
"At least one type is required");
2084 using __strictest = __strictest_alignment<_Types...>;
2085 static const size_t _S_len = _Len > __strictest::_S_size
2086 ? _Len : __strictest::_S_size;
2089 static const size_t alignment_value = __strictest::_S_alignment;
2091 typedef typename aligned_storage<_S_len, alignment_value>::type
type;
2094 template <
size_t _Len,
typename... _Types>
2095 const size_t aligned_union<_Len, _Types...>::alignment_value;
2099 template<
typename _Up,
2102 struct __decay_selector;
2105 template<
typename _Up>
2106 struct __decay_selector<_Up, false, false>
2107 {
typedef typename remove_cv<_Up>::type __type; };
2109 template<
typename _Up>
2110 struct __decay_selector<_Up, true, false>
2111 {
typedef typename remove_extent<_Up>::type* __type; };
2113 template<
typename _Up>
2114 struct __decay_selector<_Up, false, true>
2115 {
typedef typename add_pointer<_Up>::type __type; };
2118 template<
typename _Tp>
2121 typedef typename remove_reference<_Tp>::type __remove_type;
2124 typedef typename __decay_selector<__remove_type>::__type
type;
2127 template<
typename _Tp>
2131 template<
typename _Tp>
2132 struct __strip_reference_wrapper
2137 template<
typename _Tp>
2138 struct __strip_reference_wrapper<reference_wrapper<_Tp> >
2140 typedef _Tp& __type;
2143 template<
typename _Tp>
2144 struct __decay_and_strip
2146 typedef typename __strip_reference_wrapper<
2147 typename decay<_Tp>::type>::__type __type;
2153 template<
bool,
typename _Tp =
void>
2158 template<
typename _Tp>
2159 struct enable_if<true, _Tp>
2160 {
typedef _Tp
type; };
2162 template<
typename... _Cond>
2163 using _Require =
typename enable_if<__and_<_Cond...>::value>
::type;
2167 template<
bool _Cond,
typename _Iftrue,
typename _Iffalse>
2169 {
typedef _Iftrue
type; };
2172 template<
typename _Iftrue,
typename _Iffalse>
2173 struct conditional<false, _Iftrue, _Iffalse>
2174 {
typedef _Iffalse
type; };
2177 template<
typename... _Tp>
2182 struct __do_common_type_impl
2184 template<
typename _Tp,
typename _Up>
2185 static __success_type<
typename decay<decltype
2186 (
true ? std::declval<_Tp>()
2187 : std::declval<_Up>())>::type> _S_test(
int);
2189 template<
typename,
typename>
2190 static __failure_type _S_test(...);
2193 template<
typename _Tp,
typename _Up>
2194 struct __common_type_impl
2195 :
private __do_common_type_impl
2197 typedef decltype(_S_test<_Tp, _Up>(0))
type;
2200 struct __do_member_type_wrapper
2202 template<
typename _Tp>
2203 static __success_type<typename _Tp::type> _S_test(
int);
2206 static __failure_type _S_test(...);
2209 template<
typename _Tp>
2210 struct __member_type_wrapper
2211 :
private __do_member_type_wrapper
2213 typedef decltype(_S_test<_Tp>(0))
type;
2216 template<
typename _CTp,
typename... _Args>
2217 struct __expanded_common_type_wrapper
2219 typedef common_type<
typename _CTp::type, _Args...>
type;
2222 template<
typename... _Args>
2223 struct __expanded_common_type_wrapper<__failure_type, _Args...>
2224 {
typedef __failure_type
type; };
2226 template<
typename _Tp>
2227 struct common_type<_Tp>
2228 {
typedef typename decay<_Tp>::type
type; };
2230 template<
typename _Tp,
typename _Up>
2231 struct common_type<_Tp, _Up>
2232 :
public __common_type_impl<_Tp, _Up>::type
2235 template<
typename _Tp,
typename _Up,
typename... _Vp>
2236 struct common_type<_Tp, _Up, _Vp...>
2237 :
public __expanded_common_type_wrapper<typename __member_type_wrapper<
2238 common_type<_Tp, _Up>>::type, _Vp...>::type
2242 template<
typename _Tp>
2243 struct underlying_type
2245 typedef __underlying_type(_Tp)
type;
2248 template<
typename _Tp>
2249 struct __declval_protector
2251 static const bool __stop =
false;
2252 static typename add_rvalue_reference<_Tp>::type __delegate();
2255 template<
typename _Tp>
2256 inline typename add_rvalue_reference<_Tp>::type
2259 static_assert(__declval_protector<_Tp>::__stop,
2260 "declval() must not be used!");
2261 return __declval_protector<_Tp>::__delegate();
2265 template<
typename _Signature>
2270 #define __cpp_lib_result_of_sfinae 201210 2272 struct __invoke_memfun_ref { };
2273 struct __invoke_memfun_deref { };
2274 struct __invoke_memobj_ref { };
2275 struct __invoke_memobj_deref { };
2276 struct __invoke_other { };
2279 template<
typename _Tp,
typename _Tag>
2280 struct __result_of_success : __success_type<_Tp>
2281 {
using __invoke_type = _Tag; };
2284 struct __result_of_memfun_ref_impl
2286 template<
typename _Fp,
typename _Tp1,
typename... _Args>
2287 static __result_of_success<decltype(
2288 (std::declval<_Tp1>().*std::declval<_Fp>())(std::declval<_Args>()...)
2289 ), __invoke_memfun_ref> _S_test(
int);
2291 template<
typename...>
2292 static __failure_type _S_test(...);
2295 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2296 struct __result_of_memfun_ref
2297 :
private __result_of_memfun_ref_impl
2299 typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0))
type;
2303 struct __result_of_memfun_deref_impl
2305 template<
typename _Fp,
typename _Tp1,
typename... _Args>
2306 static __result_of_success<decltype(
2307 ((*std::declval<_Tp1>()).*std::declval<_Fp>())(std::declval<_Args>()...)
2308 ), __invoke_memfun_deref> _S_test(
int);
2310 template<
typename...>
2311 static __failure_type _S_test(...);
2314 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2315 struct __result_of_memfun_deref
2316 :
private __result_of_memfun_deref_impl
2318 typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0))
type;
2322 struct __result_of_memobj_ref_impl
2324 template<
typename _Fp,
typename _Tp1>
2325 static __result_of_success<decltype(
2326 std::declval<_Tp1>().*std::declval<_Fp>()
2327 ), __invoke_memobj_ref> _S_test(
int);
2329 template<
typename,
typename>
2330 static __failure_type _S_test(...);
2333 template<
typename _MemPtr,
typename _Arg>
2334 struct __result_of_memobj_ref
2335 :
private __result_of_memobj_ref_impl
2337 typedef decltype(_S_test<_MemPtr, _Arg>(0))
type;
2341 struct __result_of_memobj_deref_impl
2343 template<
typename _Fp,
typename _Tp1>
2344 static __result_of_success<decltype(
2345 (*std::declval<_Tp1>()).*std::declval<_Fp>()
2346 ), __invoke_memobj_deref> _S_test(
int);
2348 template<
typename,
typename>
2349 static __failure_type _S_test(...);
2352 template<
typename _MemPtr,
typename _Arg>
2353 struct __result_of_memobj_deref
2354 :
private __result_of_memobj_deref_impl
2356 typedef decltype(_S_test<_MemPtr, _Arg>(0))
type;
2359 template<
typename _MemPtr,
typename _Arg>
2360 struct __result_of_memobj;
2362 template<
typename _Res,
typename _Class,
typename _Arg>
2363 struct __result_of_memobj<_Res _Class::*, _Arg>
2365 typedef typename remove_cv<
typename remove_reference<
2366 _Arg>::type>::type _Argval;
2367 typedef _Res _Class::* _MemPtr;
2368 typedef typename conditional<__or_<is_same<_Argval, _Class>,
2369 is_base_of<_Class, _Argval>>::value,
2370 __result_of_memobj_ref<_MemPtr, _Arg>,
2371 __result_of_memobj_deref<_MemPtr, _Arg>
2375 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2376 struct __result_of_memfun;
2378 template<
typename _Res,
typename _Class,
typename _Arg,
typename... _Args>
2379 struct __result_of_memfun<_Res _Class::*, _Arg, _Args...>
2381 typedef typename remove_cv<
typename remove_reference<
2382 _Arg>::type>::type _Argval;
2383 typedef _Res _Class::* _MemPtr;
2384 typedef typename conditional<__or_<is_same<_Argval, _Class>,
2385 is_base_of<_Class, _Argval>>::value,
2386 __result_of_memfun_ref<_MemPtr, _Arg, _Args...>,
2387 __result_of_memfun_deref<_MemPtr, _Arg, _Args...>
2395 template<
typename _Res,
typename _Class,
typename _Arg>
2396 struct __result_of_memobj<_Res _Class::*, reference_wrapper<_Arg>>
2397 : __result_of_memobj_ref<_Res _Class::*, _Arg&>
2400 template<
typename _Res,
typename _Class,
typename _Arg>
2401 struct __result_of_memobj<_Res _Class::*, reference_wrapper<_Arg>&>
2402 : __result_of_memobj_ref<_Res _Class::*, _Arg&>
2405 template<
typename _Res,
typename _Class,
typename _Arg>
2406 struct __result_of_memobj<_Res _Class::*, const reference_wrapper<_Arg>&>
2407 : __result_of_memobj_ref<_Res _Class::*, _Arg&>
2410 template<
typename _Res,
typename _Class,
typename _Arg>
2411 struct __result_of_memobj<_Res _Class::*, reference_wrapper<_Arg>&&>
2412 : __result_of_memobj_ref<_Res _Class::*, _Arg&>
2415 template<
typename _Res,
typename _Class,
typename _Arg>
2416 struct __result_of_memobj<_Res _Class::*, const reference_wrapper<_Arg>&&>
2417 : __result_of_memobj_ref<_Res _Class::*, _Arg&>
2420 template<
typename _Res,
typename _Class,
typename _Arg,
typename... _Args>
2421 struct __result_of_memfun<_Res _Class::*, reference_wrapper<_Arg>, _Args...>
2422 : __result_of_memfun_ref<_Res _Class::*, _Arg&, _Args...>
2425 template<
typename _Res,
typename _Class,
typename _Arg,
typename... _Args>
2426 struct __result_of_memfun<_Res _Class::*, reference_wrapper<_Arg>&,
2428 : __result_of_memfun_ref<_Res _Class::*, _Arg&, _Args...>
2431 template<
typename _Res,
typename _Class,
typename _Arg,
typename... _Args>
2432 struct __result_of_memfun<_Res _Class::*, const reference_wrapper<_Arg>&,
2434 : __result_of_memfun_ref<_Res _Class::*, _Arg&, _Args...>
2437 template<
typename _Res,
typename _Class,
typename _Arg,
typename... _Args>
2438 struct __result_of_memfun<_Res _Class::*, reference_wrapper<_Arg>&&,
2440 : __result_of_memfun_ref<_Res _Class::*, _Arg&, _Args...>
2443 template<
typename _Res,
typename _Class,
typename _Arg,
typename... _Args>
2444 struct __result_of_memfun<_Res _Class::*, const reference_wrapper<_Arg>&&,
2446 : __result_of_memfun_ref<_Res _Class::*, _Arg&, _Args...>
2449 template<bool, bool,
typename _Functor,
typename... _ArgTypes>
2450 struct __result_of_impl
2452 typedef __failure_type
type;
2455 template<
typename _MemPtr,
typename _Arg>
2456 struct __result_of_impl<true, false, _MemPtr, _Arg>
2457 :
public __result_of_memobj<typename decay<_MemPtr>::type, _Arg>
2460 template<
typename _MemPtr,
typename _Arg,
typename... _Args>
2461 struct __result_of_impl<false, true, _MemPtr, _Arg, _Args...>
2462 :
public __result_of_memfun<typename decay<_MemPtr>::type, _Arg, _Args...>
2466 struct __result_of_other_impl
2468 template<
typename _Fn,
typename... _Args>
2469 static __result_of_success<decltype(
2470 std::declval<_Fn>()(std::declval<_Args>()...)
2471 ), __invoke_other> _S_test(
int);
2473 template<
typename...>
2474 static __failure_type _S_test(...);
2477 template<
typename _Functor,
typename... _ArgTypes>
2478 struct __result_of_impl<false, false, _Functor, _ArgTypes...>
2479 :
private __result_of_other_impl
2481 typedef decltype(_S_test<_Functor, _ArgTypes...>(0))
type;
2484 template<
typename _Functor,
typename... _ArgTypes>
2485 struct result_of<_Functor(_ArgTypes...)>
2486 :
public __result_of_impl<
2487 is_member_object_pointer<
2488 typename remove_reference<_Functor>::type
2490 is_member_function_pointer<
2491 typename remove_reference<_Functor>::type
2493 _Functor, _ArgTypes...
2497 #if __cplusplus > 201103L 2499 template<
size_t _Len,
size_t _Align =
2500 __alignof__(
typename __aligned_storage_msa<_Len>::__type)>
2501 using aligned_storage_t =
typename aligned_storage<_Len, _Align>::type;
2503 template <
size_t _Len,
typename... _Types>
2504 using aligned_union_t =
typename aligned_union<_Len, _Types...>::type;
2507 template<
typename _Tp>
2508 using decay_t =
typename decay<_Tp>::type;
2511 template<
bool _Cond,
typename _Tp =
void>
2512 using enable_if_t =
typename enable_if<_Cond, _Tp>::type;
2515 template<
bool _Cond,
typename _Iftrue,
typename _Iffalse>
2516 using conditional_t =
typename conditional<_Cond, _Iftrue, _Iffalse>::type;
2519 template<
typename... _Tp>
2520 using common_type_t =
typename common_type<_Tp...>::type;
2523 template<
typename _Tp>
2524 using underlying_type_t =
typename underlying_type<_Tp>::type;
2527 template<
typename _Tp>
2528 using result_of_t =
typename result_of<_Tp>::type;
2531 template<
typename...>
using __void_t = void;
2533 #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 2534 #define __cpp_lib_void_t 201411 2536 template<
typename...>
using void_t = void;
2540 template<
typename _Default,
typename _AlwaysVoid,
2541 template<
typename...>
class _Op,
typename... _Args>
2545 using type = _Default;
2549 template<
typename _Default,
template<
typename...>
class _Op,
2551 struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...>
2554 using type = _Op<_Args...>;
2558 template<
typename _Default,
template<
typename...>
class _Op,
2560 using __detected_or = __detector<_Default, void, _Op, _Args...>;
2563 template<
typename _Default,
template<
typename...>
class _Op,
2565 using __detected_or_t
2566 =
typename __detected_or<_Default, _Op, _Args...>::type;
2574 #define _GLIBCXX_HAS_NESTED_TYPE(_NTYPE) \ 2575 template<typename _Tp, typename = __void_t<>> \ 2576 struct __has_##_NTYPE \ 2579 template<typename _Tp> \ 2580 struct __has_##_NTYPE<_Tp, __void_t<typename _Tp::_NTYPE>> \ 2584 template <
typename _Tp>
2585 struct __is_swappable;
2587 template <
typename _Tp>
2588 struct __is_nothrow_swappable;
2590 template<
typename... _Elements>
2594 struct __is_tuple_like_impl : false_type
2597 template<
typename... _Tps>
2598 struct __is_tuple_like_impl<tuple<_Tps...>> : true_type
2602 template<
typename _Tp>
2603 struct __is_tuple_like
2604 :
public __is_tuple_like_impl<typename remove_cv<
2605 typename remove_reference<_Tp>::type>::type>::type
2608 template<
typename _Tp>
2610 typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>,
2611 is_move_constructible<_Tp>,
2612 is_move_assignable<_Tp>>::value>::type
2614 noexcept(__and_<is_nothrow_move_constructible<_Tp>,
2615 is_nothrow_move_assignable<_Tp>>::value);
2617 template<
typename _Tp,
size_t _Nm>
2619 typename enable_if<__is_swappable<_Tp>::value>::type
2620 swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
2621 noexcept(__is_nothrow_swappable<_Tp>::value);
2623 namespace __swappable_details {
2626 struct __do_is_swappable_impl
2628 template<
typename _Tp,
typename 2629 = decltype(swap(std::declval<_Tp&>(), std::declval<_Tp&>()))>
2630 static true_type __test(
int);
2633 static false_type __test(...);
2636 struct __do_is_nothrow_swappable_impl
2638 template<
typename _Tp>
2639 static __bool_constant<
2640 noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>()))
2644 static false_type __test(...);
2649 template<
typename _Tp>
2650 struct __is_swappable_impl
2651 :
public __swappable_details::__do_is_swappable_impl
2653 typedef decltype(__test<_Tp>(0))
type;
2656 template<
typename _Tp>
2657 struct __is_nothrow_swappable_impl
2658 :
public __swappable_details::__do_is_nothrow_swappable_impl
2660 typedef decltype(__test<_Tp>(0))
type;
2663 template<
typename _Tp>
2664 struct __is_swappable
2665 :
public __is_swappable_impl<_Tp>::type
2668 template<
typename _Tp>
2669 struct __is_nothrow_swappable
2670 :
public __is_nothrow_swappable_impl<_Tp>::type
2673 #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 2674 #define __cpp_lib_is_swappable 201603 2678 template<
typename _Tp>
2680 :
public __is_swappable_impl<_Tp>::type
2684 template<
typename _Tp>
2685 struct is_nothrow_swappable
2686 :
public __is_nothrow_swappable_impl<_Tp>::type
2689 #if __cplusplus >= 201402L 2691 template<
typename _Tp>
2692 constexpr
bool is_swappable_v = is_swappable<_Tp>::value;
2695 template<
typename _Tp>
2696 constexpr
bool is_nothrow_swappable_v = is_nothrow_swappable<_Tp>::value;
2697 #endif // __cplusplus >= 201402L 2699 namespace __swappable_with_details {
2702 struct __do_is_swappable_with_impl
2704 template<
typename _Tp,
typename _Up,
typename 2705 = decltype(swap(std::declval<_Tp>(), std::declval<_Up>())),
2707 = decltype(swap(std::declval<_Up>(), std::declval<_Tp>()))>
2708 static true_type __test(
int);
2710 template<
typename,
typename>
2711 static false_type __test(...);
2714 struct __do_is_nothrow_swappable_with_impl
2716 template<
typename _Tp,
typename _Up>
2717 static __bool_constant<
2718 noexcept(swap(std::declval<_Tp>(), std::declval<_Up>()))
2720 noexcept(swap(std::declval<_Up>(), std::declval<_Tp>()))
2723 template<
typename,
typename>
2724 static false_type __test(...);
2729 template<
typename _Tp,
typename _Up>
2730 struct __is_swappable_with_impl
2731 :
public __swappable_with_details::__do_is_swappable_with_impl
2733 typedef decltype(__test<_Tp, _Up>(0))
type;
2737 template<
typename _Tp>
2738 struct __is_swappable_with_impl<_Tp&, _Tp&>
2739 :
public __swappable_details::__do_is_swappable_impl
2741 typedef decltype(__test<_Tp&>(0))
type;
2744 template<
typename _Tp,
typename _Up>
2745 struct __is_nothrow_swappable_with_impl
2746 :
public __swappable_with_details::__do_is_nothrow_swappable_with_impl
2748 typedef decltype(__test<_Tp, _Up>(0))
type;
2752 template<
typename _Tp>
2753 struct __is_nothrow_swappable_with_impl<_Tp&, _Tp&>
2754 :
public __swappable_details::__do_is_nothrow_swappable_impl
2756 typedef decltype(__test<_Tp&>(0))
type;
2760 template<
typename _Tp,
typename _Up>
2761 struct is_swappable_with
2762 :
public __is_swappable_with_impl<_Tp, _Up>::type
2766 template<
typename _Tp,
typename _Up>
2767 struct is_nothrow_swappable_with
2768 :
public __is_nothrow_swappable_with_impl<_Tp, _Up>::type
2771 #if __cplusplus >= 201402L 2773 template<
typename _Tp,
typename _Up>
2774 constexpr
bool is_swappable_with_v = is_swappable_with<_Tp, _Up>::value;
2777 template<
typename _Tp,
typename _Up>
2778 constexpr
bool is_nothrow_swappable_with_v =
2779 is_nothrow_swappable_with<_Tp, _Up>::value;
2780 #endif // __cplusplus >= 201402L 2782 #endif// c++1z or gnu++11 2786 template<
typename _Result,
typename _Ret,
typename = __
void_t<>>
2787 struct __is_callable_impl : false_type { };
2789 template<
typename _Result,
typename _Ret>
2790 struct __is_callable_impl<_Result, _Ret, __void_t<typename _Result::
type>>
2791 : __or_<is_void<_Ret>, is_convertible<typename _Result::type, _Ret>>::type
2794 template<
typename,
typename _Ret =
void>
2795 struct __is_callable;
2797 template<
typename _Fn,
typename... _ArgTypes,
typename _Ret>
2798 struct __is_callable<_Fn(_ArgTypes...), _Ret>
2799 : __is_callable_impl<result_of<_Fn(_ArgTypes...)>, _Ret>::type
2803 template<typename _Tp, typename _Up = typename decay<_Tp>::type>
2809 template<
typename _Tp,
typename _Up>
2810 struct __inv_unwrap<_Tp, reference_wrapper<_Up>>
2815 template<
typename _Fn,
typename _Tp,
typename... _Args>
2816 constexpr
bool __call_is_nt(__invoke_memfun_ref)
2818 using _Up =
typename __inv_unwrap<_Tp>::type;
2819 return noexcept((std::declval<_Up>().*std::declval<_Fn>())(
2820 std::declval<_Args>()...));
2823 template<
typename _Fn,
typename _Tp,
typename... _Args>
2824 constexpr
bool __call_is_nt(__invoke_memfun_deref)
2826 return noexcept(((*std::declval<_Tp>()).*std::declval<_Fn>())(
2827 std::declval<_Args>()...));
2830 template<
typename _Fn,
typename _Tp>
2831 constexpr
bool __call_is_nt(__invoke_memobj_ref)
2833 using _Up =
typename __inv_unwrap<_Tp>::type;
2834 return noexcept(std::declval<_Up>().*std::declval<_Fn>());
2837 template<
typename _Fn,
typename _Tp>
2838 constexpr
bool __call_is_nt(__invoke_memobj_deref)
2840 return noexcept((*std::declval<_Tp>()).*std::declval<_Fn>());
2843 template<
typename _Fn,
typename... _Args>
2844 constexpr
bool __call_is_nt(__invoke_other)
2846 return noexcept(std::declval<_Fn>()(std::declval<_Args>()...));
2849 template<
typename _ResultOf,
typename _Fn,
typename... _Args>
2850 struct __call_is_nothrow
2852 std::__call_is_nt<_Fn, _Args...>(typename _ResultOf::__invoke_type{})>
2857 template<
typename,
typename _Ret =
void>
2858 struct __is_nothrow_callable;
2860 template<
typename _Fn,
typename... _Args,
typename _Ret>
2861 struct __is_nothrow_callable<_Fn(_Args...), _Ret>
2862 : __and_<__is_callable<_Fn(_Args...), _Ret>,
2863 __call_is_nothrow<result_of<_Fn(_Args...)>, _Fn, _Args...>>::type
2867 __nonesuch() =
delete;
2868 ~__nonesuch() =
delete;
2869 __nonesuch(__nonesuch
const&) =
delete;
2870 void operator=(__nonesuch
const&) =
delete;
2873 #if __cplusplus > 201402L 2874 # define __cpp_lib_is_callable 201603 2877 template<
typename,
typename _Ret =
void>
2880 template<
typename _Fn,
typename... _ArgTypes,
typename _Ret>
2881 struct is_callable<_Fn(_ArgTypes...), _Ret>
2882 : __is_callable<_Fn(_ArgTypes...), _Ret>::type
2886 template<
typename,
typename _Ret =
void>
2887 struct is_nothrow_callable;
2889 template<
typename _Fn,
typename... _ArgTypes,
typename _Ret>
2890 struct is_nothrow_callable<_Fn(_ArgTypes...), _Ret>
2891 : __is_nothrow_callable<_Fn(_ArgTypes...), _Ret>::type
2895 template<
typename T,
typename _Ret =
void>
2896 constexpr
bool is_callable_v = is_callable<T, _Ret>::value;
2899 template<
typename T,
typename _Ret =
void>
2900 constexpr
bool is_nothrow_callable_v = is_nothrow_callable<T, _Ret>::value;
2904 #if __cplusplus > 201402L 2905 # define __cpp_lib_type_trait_variable_templates 201510L 2906 template <
typename _Tp>
2908 template <
typename _Tp>
2910 template <
typename _Tp>
2912 template <
typename _Tp>
2914 template <
typename _Tp>
2916 template <
typename _Tp>
2918 template <
typename _Tp>
2920 template <
typename _Tp>
2922 template <
typename _Tp>
2923 constexpr
bool is_member_object_pointer_v =
2925 template <
typename _Tp>
2926 constexpr
bool is_member_function_pointer_v =
2928 template <
typename _Tp>
2930 template <
typename _Tp>
2932 template <
typename _Tp>
2934 template <
typename _Tp>
2936 template <
typename _Tp>
2938 template <
typename _Tp>
2940 template <
typename _Tp>
2942 template <
typename _Tp>
2944 template <
typename _Tp>
2946 template <
typename _Tp>
2948 template <
typename _Tp>
2950 template <
typename _Tp>
2952 template <
typename _Tp>
2954 template <
typename _Tp>
2956 template <
typename _Tp>
2957 constexpr
bool is_trivially_copyable_v = is_trivially_copyable<_Tp>::value;
2958 template <
typename _Tp>
2960 template <
typename _Tp>
2962 template <
typename _Tp>
2964 template <
typename _Tp>
2966 template <
typename _Tp>
2968 template <
typename _Tp>
2970 template <
typename _Tp>
2972 template <
typename _Tp>
2973 constexpr
bool is_signed_v = is_signed<_Tp>::value;
2974 template <
typename _Tp>
2975 constexpr
bool is_unsigned_v = is_unsigned<_Tp>::value;
2976 template <
typename _Tp,
typename... _Args>
2977 constexpr
bool is_constructible_v = is_constructible<_Tp, _Args...>::value;
2978 template <
typename _Tp>
2979 constexpr
bool is_default_constructible_v =
2980 is_default_constructible<_Tp>::value;
2981 template <
typename _Tp>
2982 constexpr
bool is_copy_constructible_v = is_copy_constructible<_Tp>::value;
2983 template <
typename _Tp>
2984 constexpr
bool is_move_constructible_v = is_move_constructible<_Tp>::value;
2985 template <
typename _Tp,
typename _Up>
2986 constexpr
bool is_assignable_v = is_assignable<_Tp, _Up>::value;
2987 template <
typename _Tp>
2988 constexpr
bool is_copy_assignable_v = is_copy_assignable<_Tp>::value;
2989 template <
typename _Tp>
2990 constexpr
bool is_move_assignable_v = is_move_assignable<_Tp>::value;
2991 template <
typename _Tp>
2992 constexpr
bool is_destructible_v = is_destructible<_Tp>::value;
2993 template <
typename _Tp,
typename... _Args>
2994 constexpr
bool is_trivially_constructible_v =
2995 is_trivially_constructible<_Tp, _Args...>::value;
2996 template <
typename _Tp>
2997 constexpr
bool is_trivially_default_constructible_v =
2998 is_trivially_default_constructible<_Tp>::value;
2999 template <
typename _Tp>
3000 constexpr
bool is_trivially_copy_constructible_v =
3001 is_trivially_copy_constructible<_Tp>::value;
3002 template <
typename _Tp>
3003 constexpr
bool is_trivially_move_constructible_v =
3004 is_trivially_move_constructible<_Tp>::value;
3005 template <
typename _Tp,
typename _Up>
3006 constexpr
bool is_trivially_assignable_v =
3007 is_trivially_assignable<_Tp, _Up>::value;
3008 template <
typename _Tp>
3009 constexpr
bool is_trivially_copy_assignable_v =
3010 is_trivially_copy_assignable<_Tp>::value;
3011 template <
typename _Tp>
3012 constexpr
bool is_trivially_move_assignable_v =
3013 is_trivially_move_assignable<_Tp>::value;
3014 template <
typename _Tp>
3015 constexpr
bool is_trivially_destructible_v =
3016 is_trivially_destructible<_Tp>::value;
3017 template <
typename _Tp,
typename... _Args>
3018 constexpr
bool is_nothrow_constructible_v =
3019 is_nothrow_constructible<_Tp, _Args...>::value;
3020 template <
typename _Tp>
3021 constexpr
bool is_nothrow_default_constructible_v =
3022 is_nothrow_default_constructible<_Tp>::value;
3023 template <
typename _Tp>
3024 constexpr
bool is_nothrow_copy_constructible_v =
3025 is_nothrow_copy_constructible<_Tp>::value;
3026 template <
typename _Tp>
3027 constexpr
bool is_nothrow_move_constructible_v =
3028 is_nothrow_move_constructible<_Tp>::value;
3029 template <
typename _Tp,
typename _Up>
3030 constexpr
bool is_nothrow_assignable_v =
3031 is_nothrow_assignable<_Tp, _Up>::value;
3032 template <
typename _Tp>
3033 constexpr
bool is_nothrow_copy_assignable_v =
3034 is_nothrow_copy_assignable<_Tp>::value;
3035 template <
typename _Tp>
3036 constexpr
bool is_nothrow_move_assignable_v =
3037 is_nothrow_move_assignable<_Tp>::value;
3038 template <
typename _Tp>
3039 constexpr
bool is_nothrow_destructible_v =
3040 is_nothrow_destructible<_Tp>::value;
3041 template <
typename _Tp>
3042 constexpr
bool has_virtual_destructor_v =
3043 has_virtual_destructor<_Tp>::value;
3044 template <
typename _Tp>
3045 constexpr
size_t alignment_of_v = alignment_of<_Tp>::value;
3046 template <
typename _Tp>
3047 constexpr
size_t rank_v = rank<_Tp>::value;
3048 template <
typename _Tp,
unsigned _Idx = 0>
3049 constexpr
size_t extent_v = extent<_Tp, _Idx>::value;
3050 template <
typename _Tp,
typename _Up>
3051 constexpr
bool is_same_v = is_same<_Tp, _Up>::value;
3052 template <
typename _Base,
typename _Derived>
3053 constexpr
bool is_base_of_v = is_base_of<_Base, _Derived>::value;
3054 template <
typename _From,
typename _To>
3055 constexpr
bool is_convertible_v = is_convertible<_From, _To>::value;
3057 #ifdef __has_builtin 3058 # if !__has_builtin(__has_unique_object_representations) 3060 # define _GLIBCXX_NO_BUILTIN_HAS_UNIQ_OBJ_REP 1 3064 #ifndef _GLIBCXX_NO_BUILTIN_HAS_UNIQ_OBJ_REP 3065 # define __cpp_lib_has_unique_object_representations 201606 3067 template<
typename _Tp>
3068 struct has_unique_object_representations
3069 : bool_constant<__has_unique_object_representations(
3070 remove_cv_t<remove_all_extents_t<_Tp>>
3074 #undef _GLIBCXX_NO_BUILTIN_HAS_UNIQ_OBJ_REP 3078 _GLIBCXX_END_NAMESPACE_VERSION
3083 #endif // _GLIBCXX_TYPE_TRAITS
Primary class template, tuple.
is_member_function_pointer
is_null_pointer (LWG 2247).
ISO C++ entities toplevel namespace is std.
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
Primary class template for reference_wrapper.
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
__is_nullptr_t (extension).