// is_member_function_pointer
-template <class _Tp> struct __libcpp_is_member_function_pointer : public false_type {};
-template <class _Tp, class _Up> struct __libcpp_is_member_function_pointer<_Tp _Up::*> : public is_function<_Tp> {};
+// template <class _Tp> struct __libcpp_is_member_function_pointer : public false_type {};
+// template <class _Tp, class _Up> struct __libcpp_is_member_function_pointer<_Tp _Up::*> : public is_function<_Tp> {};
+//
+
+template <class _MP, bool _IsMemberFuctionPtr, bool _IsMemberObjectPtr>
+struct __member_pointer_traits_imp
+{ // forward declaration; specializations later
+};
+
+
+namespace __libcpp_is_member_function_pointer_imp {
+ template <typename _Tp>
+ char __test(typename std::__member_pointer_traits_imp<_Tp, true, false>::_FnType *);
+
+ template <typename>
+ std::__two __test(...);
+};
+
+template <class _Tp> struct __libcpp_is_member_function_pointer
+ : public integral_constant<bool, sizeof(__libcpp_is_member_function_pointer_imp::__test<_Tp>(nullptr)) == 1> {};
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_member_function_pointer
: public __libcpp_is_member_function_pointer<typename remove_cv<_Tp>::type> {};
#endif
-template <class _MP, bool _IsMemberFuctionPtr, bool _IsMemberObjectPtr>
-struct __member_pointer_traits_imp
-{
-};
-
#ifndef _LIBCPP_HAS_NO_VARIADICS
template <class _Rp, class _Class, class ..._Param>
{
typedef _Class _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_Param...);
};
template <class _Rp, class _Class, class ..._Param>
{
typedef _Class const _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_Param...);
};
template <class _Rp, class _Class, class ..._Param>
{
typedef _Class volatile _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_Param...);
};
template <class _Rp, class _Class, class ..._Param>
{
typedef _Class const volatile _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_Param...);
};
#if __has_feature(cxx_reference_qualified_functions)
{
typedef _Class& _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_Param...);
};
template <class _Rp, class _Class, class ..._Param>
{
typedef _Class const& _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_Param...);
};
template <class _Rp, class _Class, class ..._Param>
{
typedef _Class volatile& _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_Param...);
};
template <class _Rp, class _Class, class ..._Param>
{
typedef _Class const volatile& _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_Param...);
};
template <class _Rp, class _Class, class ..._Param>
{
typedef _Class&& _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_Param...);
};
template <class _Rp, class _Class, class ..._Param>
{
typedef _Class const&& _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_Param...);
};
template <class _Rp, class _Class, class ..._Param>
{
typedef _Class volatile&& _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_Param...);
};
template <class _Rp, class _Class, class ..._Param>
{
typedef _Class const volatile&& _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_Param...);
};
#endif // __has_feature(cxx_reference_qualified_functions)
{
typedef _Class _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) ();
};
template <class _Rp, class _Class, class _P0>
{
typedef _Class _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_P0);
};
template <class _Rp, class _Class, class _P0, class _P1>
{
typedef _Class _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_P0, _P1);
};
template <class _Rp, class _Class, class _P0, class _P1, class _P2>
{
typedef _Class _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_P0, _P1, _P2);
};
template <class _Rp, class _Class>
{
typedef _Class const _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) ();
};
template <class _Rp, class _Class, class _P0>
{
typedef _Class const _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_P0);
};
template <class _Rp, class _Class, class _P0, class _P1>
{
typedef _Class const _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_P0, _P1);
};
template <class _Rp, class _Class, class _P0, class _P1, class _P2>
{
typedef _Class const _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_P0, _P1, _P2);
};
template <class _Rp, class _Class>
{
typedef _Class volatile _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) ();
};
template <class _Rp, class _Class, class _P0>
{
typedef _Class volatile _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_P0);
};
template <class _Rp, class _Class, class _P0, class _P1>
{
typedef _Class volatile _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_P0, _P1);
};
template <class _Rp, class _Class, class _P0, class _P1, class _P2>
{
typedef _Class volatile _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_P0, _P1, _P2);
};
template <class _Rp, class _Class>
{
typedef _Class const volatile _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) ();
};
template <class _Rp, class _Class, class _P0>
{
typedef _Class const volatile _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_P0);
};
template <class _Rp, class _Class, class _P0, class _P1>
{
typedef _Class const volatile _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_P0, _P1);
};
template <class _Rp, class _Class, class _P0, class _P1, class _P2>
{
typedef _Class const volatile _ClassType;
typedef _Rp _ReturnType;
+ typedef _Rp (_FnType) (_P0, _P1, _P2);
};
#endif // _LIBCPP_HAS_NO_VARIADICS
{
// typedef ... _ClassType;
// typedef ... _ReturnType;
+// typedef ... _FnType;
};
// result_of
// is_nothrow_constructible
+#if 0
+template <class _Tp, class... _Args>
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible
+ : public integral_constant<bool, __is_nothrow_constructible(_Tp(_Args...))>
+{
+};
+
+#else
+
#ifndef _LIBCPP_HAS_NO_VARIADICS
#if __has_feature(cxx_noexcept)
};
#endif // _LIBCPP_HAS_NO_VARIADICS
+#endif // __has_feature(is_nothrow_constructible)
// is_nothrow_default_constructible