29 #ifndef _GLIBCXX_TYPE_TRAITS
30 #define _GLIBCXX_TYPE_TRAITS 1
32 #pragma GCC system_header
34 #ifndef __GXX_EXPERIMENTAL_CXX0X__
40 namespace std _GLIBCXX_VISIBILITY(default)
42 _GLIBCXX_BEGIN_NAMESPACE_VERSION
51 typedef struct {
char __arr[2]; } __two;
54 #define _DEFINE_SPEC_0_HELPER \
57 #define _DEFINE_SPEC_1_HELPER \
58 template<typename _Tp>
60 #define _DEFINE_SPEC_2_HELPER \
61 template<typename _Tp, typename _Cp>
63 #define _DEFINE_SPEC(_Order, _Trait, _Type, _Value) \
64 _DEFINE_SPEC_##_Order##_HELPER \
65 struct _Trait<_Type> \
66 : public integral_constant<bool, _Value> { };
71 template<
typename _Tp, _Tp __v>
74 static constexpr _Tp value = __v;
75 typedef _Tp value_type;
77 constexpr
operator value_type() {
return value; }
86 template<
typename _Tp, _Tp __v>
94 struct __is_void_helper
96 _DEFINE_SPEC(0, __is_void_helper,
void,
true)
101 template<typename _Tp>
108 struct __is_integral_helper
110 _DEFINE_SPEC(0, __is_integral_helper,
bool,
true)
111 _DEFINE_SPEC(0, __is_integral_helper,
char, true)
112 _DEFINE_SPEC(0, __is_integral_helper,
signed char, true)
113 _DEFINE_SPEC(0, __is_integral_helper,
unsigned char, true)
114 #ifdef _GLIBCXX_USE_WCHAR_T
115 _DEFINE_SPEC(0, __is_integral_helper,
wchar_t,
true)
117 _DEFINE_SPEC(0, __is_integral_helper, char16_t,
true)
118 _DEFINE_SPEC(0, __is_integral_helper, char32_t, true)
119 _DEFINE_SPEC(0, __is_integral_helper,
short, true)
120 _DEFINE_SPEC(0, __is_integral_helper,
unsigned short, true)
121 _DEFINE_SPEC(0, __is_integral_helper,
int, true)
122 _DEFINE_SPEC(0, __is_integral_helper,
unsigned int, true)
123 _DEFINE_SPEC(0, __is_integral_helper,
long, true)
124 _DEFINE_SPEC(0, __is_integral_helper,
unsigned long, true)
125 _DEFINE_SPEC(0, __is_integral_helper,
long long, true)
126 _DEFINE_SPEC(0, __is_integral_helper,
unsigned long long, true)
129 template<typename _Tp>
136 struct __is_floating_point_helper
138 _DEFINE_SPEC(0, __is_floating_point_helper,
float,
true)
139 _DEFINE_SPEC(0, __is_floating_point_helper,
double, true)
140 _DEFINE_SPEC(0, __is_floating_point_helper,
long double, true)
143 template<typename _Tp>
154 template<
typename _Tp, std::
size_t _Size>
158 template<
typename _Tp>
159 struct is_array<_Tp[]>
163 struct __is_pointer_helper
165 _DEFINE_SPEC(1, __is_pointer_helper, _Tp*,
true)
168 template<typename _Tp>
175 template<
typename _Tp>
179 template<
typename _Tp>
183 struct __is_member_object_pointer_helper
185 _DEFINE_SPEC(2, __is_member_object_pointer_helper, _Tp _Cp::*,
189 template<typename _Tp>
196 struct __is_member_function_pointer_helper
198 _DEFINE_SPEC(2, __is_member_function_pointer_helper, _Tp _Cp::*,
199 is_function<_Tp>::value)
202 template<typename _Tp>
209 template<
typename _Tp>
215 template<
typename _Tp>
221 template<
typename _Tp>
230 template<
typename _Res,
typename... _ArgTypes>
231 struct is_function<_Res(_ArgTypes...)>
233 template<
typename _Res,
typename... _ArgTypes>
234 struct is_function<_Res(_ArgTypes......)>
236 template<
typename _Res,
typename... _ArgTypes>
237 struct is_function<_Res(_ArgTypes...) const>
239 template<
typename _Res,
typename... _ArgTypes>
240 struct is_function<_Res(_ArgTypes......) const>
242 template<
typename _Res,
typename... _ArgTypes>
243 struct is_function<_Res(_ArgTypes...) volatile>
245 template<
typename _Res,
typename... _ArgTypes>
246 struct is_function<_Res(_ArgTypes......) volatile>
248 template<
typename _Res,
typename... _ArgTypes>
249 struct is_function<_Res(_ArgTypes...) const volatile>
251 template<
typename _Res,
typename... _ArgTypes>
252 struct is_function<_Res(_ArgTypes......) const volatile>
256 struct __is_nullptr_t_helper
258 _DEFINE_SPEC(0, __is_nullptr_t_helper, std::nullptr_t,
true)
261 template<typename _Tp>
262 struct __is_nullptr_t
263 : public integral_constant<
bool, (__is_nullptr_t_helper<typename
264 remove_cv<_Tp>::type>::value)>
270 template<
typename _Tp>
273 || is_floating_point<_Tp>::value)>
277 template<
typename _Tp>
280 || is_void<_Tp>::value)>
284 template<
typename _Tp>
287 || is_reference<_Tp>::value
288 || is_void<_Tp>::value)>
292 template<
typename _Tp>
296 template<
typename _Tp>
299 || is_enum<_Tp>::value
300 || is_pointer<_Tp>::value
301 || is_member_pointer<_Tp>::value
302 || __is_nullptr_t<_Tp>::value)>
306 template<
typename _Tp>
311 template<
typename _Tp>
316 template<typename _Tp>
328 template<
typename _Tp>
337 template<
typename _Tp>
342 template<
typename _Tp>
348 template<
typename _Tp>
354 template<
typename _Tp>
360 template<
typename _Tp>
366 template<
typename _Tp>
375 template<
typename _Tp, std::
size_t _Size>
376 struct rank<_Tp[_Size]>
379 template<
typename _Tp>
381 :
public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
384 template<
typename,
unsigned _U
int = 0>
388 template<
typename _Tp,
unsigned _U
int, std::
size_t _Size>
389 struct extent<_Tp[_Size], _Uint>
391 _Uint == 0 ? _Size : extent<_Tp,
395 template<
typename _Tp,
unsigned _U
int>
396 struct extent<_Tp[], _Uint>
397 :
public integral_constant<std::size_t,
398 _Uint == 0 ? 0 : extent<_Tp,
405 template<
typename,
typename>
409 template<
typename _Tp>
416 template<
typename _Tp>
418 {
typedef _Tp type; };
420 template<
typename _Tp>
422 {
typedef _Tp type; };
425 template<
typename _Tp>
427 {
typedef _Tp type; };
429 template<
typename _Tp>
431 {
typedef _Tp type; };
434 template<
typename _Tp>
438 remove_const<typename remove_volatile<_Tp>::type>::type type;
442 template<
typename _Tp>
444 {
typedef _Tp
const type; };
447 template<
typename _Tp>
449 {
typedef _Tp
volatile type; };
452 template<
typename _Tp>
462 template<
typename _Tp>
464 {
typedef _Tp type; };
466 template<
typename _Tp, std::
size_t _Size>
468 {
typedef _Tp type; };
470 template<
typename _Tp>
471 struct remove_extent<_Tp[]>
472 {
typedef _Tp type; };
475 template<
typename _Tp>
477 {
typedef _Tp type; };
479 template<
typename _Tp, std::
size_t _Size>
481 {
typedef typename remove_all_extents<_Tp>::type type; };
483 template<
typename _Tp>
484 struct remove_all_extents<_Tp[]>
485 {
typedef typename remove_all_extents<_Tp>::type type; };
489 template<
typename _Tp,
typename>
490 struct __remove_pointer_helper
491 {
typedef _Tp type; };
493 template<
typename _Tp,
typename _Up>
494 struct __remove_pointer_helper<_Tp, _Up*>
495 {
typedef _Up type; };
498 template<
typename _Tp>
500 :
public __remove_pointer_helper<_Tp, typename remove_cv<_Tp>::type>
507 template<
typename _Tp>
509 {
typedef typename remove_reference<_Tp>::type* type; };
518 template<
typename _Tp>
527 template<
typename _Tp>
534 template<
typename _Tp>
536 :
public integral_constant<bool, (is_lvalue_reference<_Tp>::value
537 || is_rvalue_reference<_Tp>::value)>
543 template<
typename _Tp>
544 struct remove_reference
545 {
typedef _Tp type; };
547 template<
typename _Tp>
548 struct remove_reference<_Tp&>
549 {
typedef _Tp type; };
551 template<
typename _Tp>
552 struct remove_reference<_Tp&&>
553 {
typedef _Tp type; };
555 template<
typename _Tp,
556 bool = !is_reference<_Tp>::value && !is_void<_Tp>::value,
557 bool = is_rvalue_reference<_Tp>::value>
558 struct __add_lvalue_reference_helper
559 {
typedef _Tp type; };
561 template<
typename _Tp>
562 struct __add_lvalue_reference_helper<_Tp, true, false>
563 {
typedef _Tp& type; };
565 template<
typename _Tp>
566 struct __add_lvalue_reference_helper<_Tp, false, true>
567 {
typedef typename remove_reference<_Tp>::type& type; };
570 template<
typename _Tp>
572 :
public __add_lvalue_reference_helper<_Tp>
575 template<
typename _Tp,
577 struct __add_rvalue_reference_helper
578 {
typedef _Tp type; };
580 template<
typename _Tp>
581 struct __add_rvalue_reference_helper<_Tp, true>
582 {
typedef _Tp&& type; };
585 template<
typename _Tp>
587 :
public __add_rvalue_reference_helper<_Tp>
592 template<
typename _Tp,
595 struct __is_signed_helper
598 template<
typename _Tp>
599 struct __is_signed_helper<_Tp, false, true>
602 template<
typename _Tp>
603 struct __is_signed_helper<_Tp, true, false>
604 :
public integral_constant<bool, static_cast<bool>(_Tp(-1) < _Tp(0))>
608 template<typename _Tp>
610 : public integral_constant<bool, __is_signed_helper<_Tp>::value>
614 template<typename _Tp>
616 : public integral_constant<bool, (is_arithmetic<_Tp>::value
617 && !is_signed<_Tp>::value)>
623 template<typename _Tp>
625 : public integral_constant<bool, __is_trivial(_Tp)>
629 template<typename _Tp>
630 struct is_standard_layout
631 : public integral_constant<bool, __is_standard_layout(_Tp)>
636 template<typename _Tp>
638 : public integral_constant<bool, __is_pod(_Tp)>
642 template<typename _Tp>
643 struct is_literal_type
644 : public integral_constant<bool, __is_literal_type(_Tp)>
647 template<typename _Tp>
648 typename add_rvalue_reference<_Tp>::type declval() noexcept;
650 template<typename _Tp, typename... _Args>
651 class __is_constructible_helper
652 : public __sfinae_types
654 template<typename _Tp1, typename... _Args1>
655 static decltype(_Tp1(declval<_Args1>()...), __one()) __test(int);
657 template<typename, typename...>
658 static __two __test(...);
661 static const bool __value = sizeof(__test<_Tp, _Args...>(0)) == 1;
664 template<typename _Tp, typename _Arg>
665 class __is_constructible_helper<_Tp, _Arg>
666 : public __sfinae_types
668 template<typename _Tp1, typename _Arg1>
669 static decltype(static_cast<_Tp1>(declval<_Arg1>()), __one())
672 template<typename, typename>
673 static __two __test(...);
676 static const bool __value = sizeof(__test<_Tp, _Arg>(0)) == 1;
682 template<typename _Tp, typename... _Args>
683 struct is_constructible
684 : public integral_constant<bool,
685 __is_constructible_helper<_Tp,
689 template<bool, typename _Tp, typename... _Args>
690 struct __is_nt_constructible_helper
691 { static const bool __value = false; };
693 template<typename _Tp, typename... _Args>
694 struct __is_nt_constructible_helper<true, _Tp, _Args...>
695 { static const bool __value = noexcept(_Tp(declval<_Args>()...)); };
697 template<typename _Tp, typename _Arg>
698 struct __is_nt_constructible_helper<true, _Tp, _Arg>
700 static const bool __value = noexcept(static_cast<_Tp>(declval<_Arg>()));
704 template<typename _Tp, typename... _Args>
705 struct is_nothrow_constructible
706 : public integral_constant<bool,
707 __is_nt_constructible_helper<is_constructible<_Tp, _Args...>::value,
708 _Tp, _Args...>::__value>
712 template<typename _Tp>
713 struct has_trivial_default_constructor
714 : public integral_constant<bool, __has_trivial_constructor(_Tp)>
718 template<typename _Tp>
719 struct has_trivial_copy_constructor
720 : public integral_constant<bool, __has_trivial_copy(_Tp)>
724 template<typename _Tp>
725 struct has_trivial_copy_assign
726 : public integral_constant<bool, __has_trivial_assign(_Tp)>
730 template<typename _Tp>
731 struct has_trivial_destructor
732 : public integral_constant<bool, __has_trivial_destructor(_Tp)>
736 template<typename _Tp>
737 struct has_nothrow_default_constructor
738 : public integral_constant<bool, __has_nothrow_constructor(_Tp)>
742 template<typename _Tp>
743 struct has_nothrow_copy_constructor
744 : public integral_constant<bool, __has_nothrow_copy(_Tp)>
748 template<typename _Tp>
749 struct has_nothrow_copy_assign
750 : public integral_constant<bool, __has_nothrow_assign(_Tp)>
756 template<typename _Base, typename _Derived>
758 : public integral_constant<bool, __is_base_of(_Base, _Derived)>
761 template<typename _From, typename _To,
762 bool = (is_void<_From>::value || is_function<_To>::value
763 || is_array<_To>::value)>
764 struct __is_convertible_helper
765 { static const bool __value = is_void<_To>::value; };
767 template<typename _From, typename _To>
768 class __is_convertible_helper<_From, _To, false>
769 : public __sfinae_types
771 template<typename _To1>
772 static void __test_aux(_To1);
774 template<typename _From1, typename _To1>
775 static decltype(__test_aux<_To1>(std::declval<_From1>()), __one())
778 template<typename, typename>
779 static __two __test(...);
782 static const bool __value = sizeof(__test<_From, _To>(0)) == 1;
788 template<typename _From, typename _To>
789 struct is_convertible
790 : public integral_constant<bool,
791 __is_convertible_helper<_From, _To>::__value>
795 template<typename _From, typename _To>
796 struct is_explicitly_convertible
797 : public is_constructible<_To, _From>
800 template<std::size_t _Len>
801 struct __aligned_storage_msa
805 unsigned char __data[_Len];
806 struct __attribute__((__aligned__)) { } __align;
820 template<std::size_t _Len, std::size_t _Align =
821 __alignof__(typename __aligned_storage_msa<_Len>::__type)>
822 struct aligned_storage
826 unsigned char __data[_Len];
827 struct __attribute__((__aligned__((_Align)))) { } __align;
835 template<bool, typename _Tp = void>
840 template<typename _Tp>
841 struct enable_if<true, _Tp>
842 { typedef _Tp type; };
848 template<bool _Cond, typename _Iftrue, typename _Iffalse>
850 { typedef _Iftrue type; };
853 template<typename _Iftrue, typename _Iffalse>
854 struct conditional<false, _Iftrue, _Iffalse>
855 { typedef _Iffalse type; };
860 template<typename _Up,
861 bool _IsArray = is_array<_Up>::value,
862 bool _IsFunction = is_function<_Up>::value>
863 struct __decay_selector;
866 template<typename _Up>
867 struct __decay_selector<_Up, false, false>
868 { typedef typename remove_cv<_Up>::type __type; };
870 template<typename _Up>
871 struct __decay_selector<_Up, true, false>
872 { typedef typename remove_extent<_Up>::type* __type; };
874 template<typename _Up>
875 struct __decay_selector<_Up, false, true>
876 { typedef typename add_pointer<_Up>::type __type; };
879 template<typename _Tp>
882 typedef typename remove_reference<_Tp>::type __remove_type;
885 typedef typename __decay_selector<__remove_type>::__type type;
888 template<typename _Tp>
889 class reference_wrapper;
892 template<typename _Tp>
893 struct __strip_reference_wrapper
898 template<typename _Tp>
899 struct __strip_reference_wrapper<reference_wrapper<_Tp> >
904 template<typename _Tp>
905 struct __strip_reference_wrapper<const reference_wrapper<_Tp> >
910 template<typename _Tp>
911 struct __decay_and_strip
913 typedef typename __strip_reference_wrapper<
914 typename decay<_Tp>::type>::__type __type;
919 template<typename _Unqualified, bool _IsConst, bool _IsVol>
920 struct __cv_selector;
922 template<typename _Unqualified>
923 struct __cv_selector<_Unqualified, false, false>
924 { typedef _Unqualified __type; };
926 template<typename _Unqualified>
927 struct __cv_selector<_Unqualified, false, true>
928 { typedef volatile _Unqualified __type; };
930 template<typename _Unqualified>
931 struct __cv_selector<_Unqualified, true, false>
932 { typedef const _Unqualified __type; };
934 template<typename _Unqualified>
935 struct __cv_selector<_Unqualified, true, true>
936 { typedef const volatile _Unqualified __type; };
938 template<typename _Qualified, typename _Unqualified,
939 bool _IsConst = is_const<_Qualified>::value,
940 bool _IsVol = is_volatile<_Qualified>::value>
941 class __match_cv_qualifiers
943 typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match;
946 typedef typename __match::__type __type;
951 template<typename _Tp>
952 struct __make_unsigned
953 { typedef _Tp __type; };
956 struct __make_unsigned<char>
957 { typedef unsigned char __type; };
960 struct __make_unsigned<signed char>
961 { typedef unsigned char __type; };
964 struct __make_unsigned<short>
965 { typedef unsigned short __type; };
968 struct __make_unsigned<int>
969 { typedef unsigned int __type; };
972 struct __make_unsigned<long>
973 { typedef unsigned long __type; };
976 struct __make_unsigned<long long>
977 { typedef unsigned long long __type; };
981 template<typename _Tp,
982 bool _IsInt = is_integral<_Tp>::value,
983 bool _IsEnum = is_enum<_Tp>::value>
984 class __make_unsigned_selector;
986 template<typename _Tp>
987 class __make_unsigned_selector<_Tp, true, false>
989 typedef __make_unsigned<typename remove_cv<_Tp>::type> __unsignedt;
990 typedef typename __unsignedt::__type __unsigned_type;
991 typedef __match_cv_qualifiers<_Tp, __unsigned_type> __cv_unsigned;
994 typedef typename __cv_unsigned::__type __type;
997 template<typename _Tp>
998 class __make_unsigned_selector<_Tp, false, true>
1001 typedef unsigned char __smallest;
1002 static const bool __b0 = sizeof(_Tp) <= sizeof(__smallest);
1003 static const bool __b1 = sizeof(_Tp) <= sizeof(unsigned short);
1004 static const bool __b2 = sizeof(_Tp) <= sizeof(unsigned int);
1005 typedef conditional<__b2, unsigned int, unsigned long> __cond2;
1006 typedef typename __cond2::type __cond2_type;
1007 typedef conditional<__b1, unsigned short, __cond2_type> __cond1;
1008 typedef typename __cond1::type __cond1_type;
1011 typedef typename conditional<__b0, __smallest, __cond1_type>::type __type;
1018 template<typename _Tp>
1019 struct make_unsigned
1020 { typedef typename __make_unsigned_selector<_Tp>::__type type; };
1024 struct make_unsigned<bool>;
1028 template<typename _Tp>
1029 struct __make_signed
1030 { typedef _Tp __type; };
1033 struct __make_signed<char>
1034 { typedef signed char __type; };
1037 struct __make_signed<unsigned char>
1038 { typedef signed char __type; };
1041 struct __make_signed<unsigned short>
1042 { typedef signed short __type; };
1045 struct __make_signed<unsigned int>
1046 { typedef signed int __type; };
1049 struct __make_signed<unsigned long>
1050 { typedef signed long __type; };
1053 struct __make_signed<unsigned long long>
1054 { typedef signed long long __type; };
1058 template<typename _Tp,
1059 bool _IsInt = is_integral<_Tp>::value,
1060 bool _IsEnum = is_enum<_Tp>::value>
1061 class __make_signed_selector;
1063 template<typename _Tp>
1064 class __make_signed_selector<_Tp, true, false>
1066 typedef __make_signed<typename remove_cv<_Tp>::type> __signedt;
1067 typedef typename __signedt::__type __signed_type;
1068 typedef __match_cv_qualifiers<_Tp, __signed_type> __cv_signed;
1071 typedef typename __cv_signed::__type __type;
1074 template<typename _Tp>
1075 class __make_signed_selector<_Tp, false, true>
1078 typedef signed char __smallest;
1079 static const bool __b0 = sizeof(_Tp) <= sizeof(__smallest);
1080 static const bool __b1 = sizeof(_Tp) <= sizeof(signed short);
1081 static const bool __b2 = sizeof(_Tp) <= sizeof(signed int);
1082 typedef conditional<__b2, signed int, signed long> __cond2;
1083 typedef typename __cond2::type __cond2_type;
1084 typedef conditional<__b1, signed short, __cond2_type> __cond1;
1085 typedef typename __cond1::type __cond1_type;
1088 typedef typename conditional<__b0, __smallest, __cond1_type>::type __type;
1095 template<typename _Tp>
1097 { typedef typename __make_signed_selector<_Tp>::__type type; };
1101 struct make_signed<bool>;
1104 template<typename... _Tp>
1107 template<typename _Tp>
1108 struct common_type<_Tp>
1109 { typedef _Tp type; };
1111 template<typename _Tp, typename _Up>
1112 struct common_type<_Tp, _Up>
1113 { typedef decltype(true ? declval<_Tp>() : declval<_Up>()) type; };
1115 template<typename _Tp, typename _Up, typename... _Vp>
1116 struct common_type<_Tp, _Up, _Vp...>
1119 common_type<typename common_type<_Tp, _Up>::type, _Vp...>::type type;
1123 template<typename _Tp>
1124 struct __declval_protector
1126 static const bool __stop = false;
1127 static typename add_rvalue_reference<_Tp>::type __delegate();
1130 template<typename _Tp>
1131 inline typename add_rvalue_reference<_Tp>::type
1134 static_assert(__declval_protector<_Tp>::__stop,
1135 "declval() must not be used!");
1136 return __declval_protector<_Tp>::__delegate();
1140 template<typename _Signature>
1143 template<typename _MemPtr, typename _Arg>
1144 struct _Result_of_memobj;
1146 template<typename _Res, typename _Class, typename _Arg>
1147 struct _Result_of_memobj<_Res _Class::*, _Arg>
1150 typedef _Res _Class::* _Func;
1152 template<typename _Tp>
1153 static _Tp _S_get(const _Class&);
1154 template<typename _Tp>
1155 static decltype(*std::declval<_Tp>()) _S_get(...);
1159 decltype(_S_get<_Arg>(std::declval<_Arg>()).*std::declval<_Func>())
1163 template<typename _MemPtr, typename _Arg, typename... _ArgTypes>
1164 struct _Result_of_memfun;
1166 template<typename _Res, typename _Class, typename _Arg, typename... _Args>
1167 struct _Result_of_memfun<_Res _Class::*, _Arg, _Args...>
1170 typedef _Res _Class::* _Func;
1172 template<typename _Tp>
1173 static _Tp _S_get(const _Class&);
1174 template<typename _Tp>
1175 static decltype(*std::declval<_Tp>()) _S_get(...);
1179 decltype((_S_get<_Arg>(std::declval<_Arg>()).*std::declval<_Func>())
1180 (std::declval<_Args>()...) )
1184 template<bool, bool, typename _Functor, typename... _ArgTypes>
1185 struct _Result_of_impl;
1187 template<typename _Functor, typename... _ArgTypes>
1188 struct _Result_of_impl<false, false, _Functor, _ArgTypes...>
1191 decltype( std::declval<_Functor>()(std::declval<_ArgTypes>()...) )
1195 template<typename _MemPtr, typename _Arg>
1196 struct _Result_of_impl<true, false, _MemPtr, _Arg>
1197 : _Result_of_memobj<typename remove_reference<_MemPtr>::type, _Arg>
1199 typedef typename _Result_of_memobj<
1200 typename remove_reference<_MemPtr>::type, _Arg>::__type
1204 template<typename _MemPtr, typename _Arg, typename... _ArgTypes>
1205 struct _Result_of_impl<false, true, _MemPtr, _Arg, _ArgTypes...>
1206 : _Result_of_memfun<typename remove_reference<_MemPtr>::type, _Arg,
1209 typedef typename _Result_of_memfun<
1210 typename remove_reference<_MemPtr>::type, _Arg, _ArgTypes...>::__type
1214 template<typename _Functor, typename... _ArgTypes>
1215 struct result_of<_Functor(_ArgTypes...)>
1216 : _Result_of_impl<is_member_object_pointer<
1217 typename remove_reference<_Functor>::type >::value,
1218 is_member_function_pointer<
1219 typename remove_reference<_Functor>::type >::value,
1220 _Functor, _ArgTypes...>
1222 typedef typename _Result_of_impl<
1223 is_member_object_pointer<
1224 typename remove_reference<_Functor>::type >::value,
1225 is_member_function_pointer<
1226 typename remove_reference<_Functor>::type >::value,
1227 _Functor, _ArgTypes...>::__type
1235 #define _GLIBCXX_HAS_NESTED_TYPE(_NTYPE) \
1236 template<typename _Tp> \
1237 class __has_##_NTYPE##_helper \
1240 template<typename _Up> \
1244 template<typename _Up> \
1245 static __one __test(_Wrap_type<typename _Up::_NTYPE>*); \
1247 template<typename _Up> \
1248 static __two __test(...); \
1251 static const bool value = sizeof(__test<_Tp>(0)) == 1; \
1254 template<typename _Tp> \
1255 struct __has_##_NTYPE \
1256 : integral_constant<bool, __has_##_NTYPE##_helper \
1257 <typename remove_cv<_Tp>::type>::value> \
1260 #undef _DEFINE_SPEC_0_HELPER
1261 #undef _DEFINE_SPEC_1_HELPER
1262 #undef _DEFINE_SPEC_2_HELPER
1266 _GLIBCXX_END_NAMESPACE_VERSION