diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits index 31e3fac7b24b..bc3c1c20c5ee 100644 --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -2853,7 +2853,7 @@ __invoke(_Fp&& __f, _Args&& ...__args) template struct __invokable_imp - : private __check_complete<_Fp, _Args...> + : private __check_complete<_Fp> { typedef decltype( __invoke(_VSTD::declval<_Fp>(), _VSTD::declval<_Args>()...) diff --git a/libcxx/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp b/libcxx/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp new file mode 100644 index 000000000000..4659556897fc --- /dev/null +++ b/libcxx/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp @@ -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. +// +//===----------------------------------------------------------------------===// + +// + +// class function + +// template function(F); + +// Allow incomplete argument types in the __is_callable check + +#include + +struct X{ + typedef std::function callback_type; + virtual ~X() {} +private: + callback_type _cb; +}; + +int main() +{ +}