Relax the complete-type checks that are happening under __invokable<Fp, Args...> to only check Fp, and not Args... . This should be sufficient to give the desired high quality diagnostics under both bind and function. And this allows a test reported by Rich E on cfe-dev to pass. Tracked by <rdar://problem/11880602>.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160285 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
473f838128
commit
c425307238
@ -2853,7 +2853,7 @@ __invoke(_Fp&& __f, _Args&& ...__args)
|
|||||||
|
|
||||||
template <class _Fp, class ..._Args>
|
template <class _Fp, class ..._Args>
|
||||||
struct __invokable_imp
|
struct __invokable_imp
|
||||||
: private __check_complete<_Fp, _Args...>
|
: private __check_complete<_Fp>
|
||||||
{
|
{
|
||||||
typedef decltype(
|
typedef decltype(
|
||||||
__invoke(_VSTD::declval<_Fp>(), _VSTD::declval<_Args>()...)
|
__invoke(_VSTD::declval<_Fp>(), _VSTD::declval<_Args>()...)
|
||||||
|
@ -0,0 +1,29 @@
|
|||||||
|
//===----------------------------------------------------------------------===//
|
||||||
|
//
|
||||||
|
// The LLVM Compiler Infrastructure
|
||||||
|
//
|
||||||
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
||||||
|
// Source Licenses. See LICENSE.TXT for details.
|
||||||
|
//
|
||||||
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// <functional>
|
||||||
|
|
||||||
|
// class function<R(ArgTypes...)>
|
||||||
|
|
||||||
|
// template<class F> function(F);
|
||||||
|
|
||||||
|
// Allow incomplete argument types in the __is_callable check
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
|
struct X{
|
||||||
|
typedef std::function<void(X&)> callback_type;
|
||||||
|
virtual ~X() {}
|
||||||
|
private:
|
||||||
|
callback_type _cb;
|
||||||
|
};
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user