mirror of
https://github.com/darlinghq/darling-libcxx.git
synced 2024-11-24 04:19:48 +00:00
The implementation of the new definition of result_of (N3123) resulted in some test failures in [func.memfn] that I failed to previously notice. This corrects that mistake.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@121600 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
626916fc25
commit
eee7698bac
@ -1394,31 +1394,31 @@ public:
|
||||
typedef decltype(declval<_Fn>()(declval<_ArgTypes>()...)) type;
|
||||
};
|
||||
|
||||
template <class _MP, class _Tp, class ..._Args>
|
||||
template <class _MP, class _Tp, bool _IsMemberFunctionPtr, class ..._Args>
|
||||
struct __result_of_mp {};
|
||||
|
||||
// member function pointer
|
||||
|
||||
template <class _R, class _Class, class _Tp, class ..._Params, class ..._Args>
|
||||
struct __result_of_mp<_R (_Class::*)(_Params...), _Tp, _Args...>
|
||||
struct __result_of_mp<_R (_Class::*)(_Params...), _Tp, true, _Args...>
|
||||
{
|
||||
typedef _R type;
|
||||
};
|
||||
|
||||
template <class _R, class _Class, class _Tp, class ..._Params, class ..._Args>
|
||||
struct __result_of_mp<_R (_Class::*)(_Params...) const, _Tp, _Args...>
|
||||
struct __result_of_mp<_R (_Class::*)(_Params...) const, _Tp, true, _Args...>
|
||||
{
|
||||
typedef _R type;
|
||||
};
|
||||
|
||||
template <class _R, class _Class, class _Tp, class ..._Params, class ..._Args>
|
||||
struct __result_of_mp<_R (_Class::*)(_Params...) volatile, _Tp, _Args...>
|
||||
struct __result_of_mp<_R (_Class::*)(_Params...) volatile, _Tp, true, _Args...>
|
||||
{
|
||||
typedef _R type;
|
||||
};
|
||||
|
||||
template <class _R, class _Class, class _Tp, class ..._Params, class ..._Args>
|
||||
struct __result_of_mp<_R (_Class::*)(_Params...) const volatile, _Tp, _Args...>
|
||||
struct __result_of_mp<_R (_Class::*)(_Params...) const volatile, _Tp, true, _Args...>
|
||||
{
|
||||
typedef _R type;
|
||||
};
|
||||
@ -1441,7 +1441,7 @@ struct __result_of_mdp<_R _Class::*, _Tp, true>
|
||||
};
|
||||
|
||||
template <class _R, class _Class, class _Tp>
|
||||
struct __result_of_mp<_R _Class::*, _Tp>
|
||||
struct __result_of_mp<_R _Class::*, _Tp, false>
|
||||
: public __result_of_mdp<_R _Class::*, _Tp,
|
||||
is_base_of<_Class, typename remove_reference<_Tp>::type>::value>
|
||||
{
|
||||
@ -1449,7 +1449,8 @@ struct __result_of_mp<_R _Class::*, _Tp>
|
||||
|
||||
template <class _Fn, class _Tp, class ..._ArgTypes>
|
||||
class __result_of<_Fn(_Tp, _ArgTypes...), false> // _Fn must be member pointer
|
||||
: public __result_of_mp<_Fn, _Tp, _ArgTypes...>
|
||||
: public __result_of_mp<_Fn, _Tp, is_member_function_pointer<_Fn>::value,
|
||||
_ArgTypes...>
|
||||
{
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user