Further tweaks on relaxing complete type checking for function.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160562 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant 2012-07-20 18:56:07 +00:00
parent 7d87f6be1b
commit e41f475a44
2 changed files with 16 additions and 15 deletions

View File

@ -1113,7 +1113,8 @@ class _LIBCPP_VISIBLE function<_Rp(_ArgTypes...)>
_LIBCPP_INLINE_VISIBILITY
static bool __not_null(const function<_Rp(_Ap...)>& __p) {return __p;}
template <class _Fp, bool = __invokable<_Fp&, _ArgTypes...>::value>
template <class _Fp, bool = !is_same<_Fp, function>::value &&
__invokable<_Fp&, _ArgTypes...>::value>
struct __callable;
template <class _Fp>
struct __callable<_Fp, true>

View File

@ -2717,37 +2717,37 @@ struct __check_complete<_Tp&&>
template <class _Rp, class ..._Param>
struct __check_complete<_Rp (*)(_Param...)>
: private __check_complete<_Param...>
: private __check_complete<_Rp>
{
};
template <class _Rp, class ..._Param>
struct __check_complete<_Rp (_Param...)>
: private __check_complete<_Param...>
: private __check_complete<_Rp>
{
};
template <class _Rp, class _Class, class ..._Param>
struct __check_complete<_Rp (_Class::*)(_Param...)>
: private __check_complete<_Class, _Param...>
: private __check_complete<_Class>
{
};
template <class _Rp, class _Class, class ..._Param>
struct __check_complete<_Rp (_Class::*)(_Param...) const>
: private __check_complete<_Class, _Param...>
: private __check_complete<_Class>
{
};
template <class _Rp, class _Class, class ..._Param>
struct __check_complete<_Rp (_Class::*)(_Param...) volatile>
: private __check_complete<_Class, _Param...>
: private __check_complete<_Class>
{
};
template <class _Rp, class _Class, class ..._Param>
struct __check_complete<_Rp (_Class::*)(_Param...) const volatile>
: private __check_complete<_Class, _Param...>
: private __check_complete<_Class>
{
};
@ -2755,49 +2755,49 @@ struct __check_complete<_Rp (_Class::*)(_Param...) const volatile>
template <class _Rp, class _Class, class ..._Param>
struct __check_complete<_Rp (_Class::*)(_Param...) &>
: private __check_complete<_Class, _Param...>
: private __check_complete<_Class>
{
};
template <class _Rp, class _Class, class ..._Param>
struct __check_complete<_Rp (_Class::*)(_Param...) const&>
: private __check_complete<_Class, _Param...>
: private __check_complete<_Class>
{
};
template <class _Rp, class _Class, class ..._Param>
struct __check_complete<_Rp (_Class::*)(_Param...) volatile&>
: private __check_complete<_Class, _Param...>
: private __check_complete<_Class>
{
};
template <class _Rp, class _Class, class ..._Param>
struct __check_complete<_Rp (_Class::*)(_Param...) const volatile&>
: private __check_complete<_Class, _Param...>
: private __check_complete<_Class>
{
};
template <class _Rp, class _Class, class ..._Param>
struct __check_complete<_Rp (_Class::*)(_Param...) &&>
: private __check_complete<_Class, _Param...>
: private __check_complete<_Class>
{
};
template <class _Rp, class _Class, class ..._Param>
struct __check_complete<_Rp (_Class::*)(_Param...) const&&>
: private __check_complete<_Class, _Param...>
: private __check_complete<_Class>
{
};
template <class _Rp, class _Class, class ..._Param>
struct __check_complete<_Rp (_Class::*)(_Param...) volatile&&>
: private __check_complete<_Class, _Param...>
: private __check_complete<_Class>
{
};
template <class _Rp, class _Class, class ..._Param>
struct __check_complete<_Rp (_Class::*)(_Param...) const volatile&&>
: private __check_complete<_Class, _Param...>
: private __check_complete<_Class>
{
};