<div dir="ltr">Hi,<div><br></div><div>With clang trunk I see a lot of compile failures in libcxx tests looking like this:</div><div><br></div><div><div>In file included from invoke_lvalue.pass.cpp:19:</div><div> In file included from /home/abuild/rpmbuild/BUILD/libcxx/include/functional:474:</div>

<div> /home/abuild/rpmbuild/BUILD/libcxx/include/type_traits:438:83: error: no matching function for call to '__source'</div><div>     : public integral_constant<bool, sizeof(__libcpp_is_function_imp::__test<_Tp>(__libcpp_is_function_imp::__source<_Tp>())) == 1></div>

<div>                                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</div><div> /home/abuild/rpmbuild/BUILD/libcxx/include/type_traits:443:14: note: in instantiation of template class 'std::__1::__libcpp_is_function<void () const, false>' requested here</div>

<div>     : public __libcpp_is_function<_Tp> {};</div><div>              ^</div><div> /home/abuild/rpmbuild/BUILD/libcxx/include/type_traits:448:97: note: in instantiation of template class 'std::__1::is_function<void () const>' requested here</div>

<div> template <class _Tp, class _Up> struct __libcpp_is_member_function_pointer<_Tp _Up::*> : public is_function<_Tp> {};</div><div>                                                                                                 ^</div>

<div> /home/abuild/rpmbuild/BUILD/libcxx/include/type_traits:451:14: note: in instantiation of template class 'std::__1::__libcpp_is_member_function_pointer<void (A_void_1::*)() const>' requested here</div>
<div>
     : public __libcpp_is_member_function_pointer<typename remove_cv<_Tp>::type> {};</div><div>              ^</div><div> /home/abuild/rpmbuild/BUILD/libcxx/include/type_traits:465:38: note: in instantiation of template class 'std::__1::is_member_function_pointer<void (A_void_1::*)() const>' requested here</div>

<div>                                     !is_member_function_pointer<_Tp>::value> {};</div><div>                                      ^</div><div> /home/abuild/rpmbuild/BUILD/libcxx/include/type_traits:3162:17: note: in instantiation of template class 'std::__1::is_member_object_pointer<void (A_void_1::*)() const>' requested here</div>

<div>                 is_member_object_pointer<typename remove_reference<_Fp>::type>::value &&</div><div>                 ^</div><div> /home/abuild/rpmbuild/BUILD/libcxx/include/type_traits:3169:1: note: (skipping 2 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)</div>

<div> __invoke(_Fp&& __f, _A0&& __a0)</div><div> ^</div><div> /home/abuild/rpmbuild/BUILD/libcxx/include/type_traits:3195:11: note: in instantiation of template class 'std::__1::__invokable_imp<void (A_void_1::*)() const, A_void_1 &>' requested here</div>

<div>           __invokable_imp<_Fp, _Args...>::value></div><div>           ^</div><div> /home/abuild/rpmbuild/BUILD/libcxx/include/functional:1974:31: note: in instantiation of template class 'std::__1::__invokable<void (A_void_1::*)() const, A_void_1 &>' requested here</div>

<div>     static const bool value = __invokable<_Fp,</div><div>                               ^</div><div> /home/abuild/rpmbuild/BUILD/libcxx/include/functional:1986:18: note: in instantiation of template class 'std::__1::_is_valid_bind_return<void (A_void_1::*)() const, std::__1::tuple<std::__1::placeholders::__ph<1> >, std::__1::tuple<A_void_1 &> >' requested here</div>

<div>           bool = _is_valid_bind_return<_Fp, _BoundArgs, _TupleUj>::value></div><div>                  ^</div><div> /home/abuild/rpmbuild/BUILD/libcxx/include/functional:2083:18: note: in instantiation of default argument for '__bind_return<void (A_void_1::*)() const, std::__1::tuple<std::__1::placeholders::__ph<1> >, std::__1::tuple<A_void_1 &> >' required here</div>

<div>         typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type</div><div>                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</div><div> invoke_lvalue.pass.cpp:117:22: note: while substituting deduced template arguments into function template 'operator()' [with _Args = <A_void_1 &>]</div>

<div>     std::bind(fp, _1)(a);</div><div>                      ^</div><div> /home/abuild/rpmbuild/BUILD/libcxx/include/type_traits:429:28: note: candidate template ignored: substitution failure [with _Tp = void () const]: reference to function type 'void () const' cannot have 'const' qualifier</div>

<div> template <class _Tp> _Tp&  __source();</div><div>                      ~~~   ^</div><div> invoke_lvalue.pass.cpp:117:5: error: no matching function for call to object of type '__bind<void (A_void_1::*&)() const, std::__1::placeholders::__ph<1> &>'</div>

<div>     std::bind(fp, _1)(a);</div><div>     ^~~~~~~~~~~~~~~~~</div><div> /home/abuild/rpmbuild/BUILD/libcxx/include/functional:2084:9: note: candidate template ignored: substitution failure [with _Args = <A_void_1 &>]: implicit instantiation of undefined template 'std::__1::__bind_return<void (A_void_1::*)() const, std::__1::tuple<std::__1::placeholders::__ph<1> >, std::__1::tuple<A_void_1 &>, false>'</div>

<div>         operator()(_Args&& ...__args)</div><div>         ^</div><div> /home/abuild/rpmbuild/BUILD/libcxx/include/functional:2093:9: note: candidate template ignored: substitution failure [with _Args = <A_void_1 &>]: implicit instantiation of undefined template 'std::__1::__bind_return<void (A_void_1::*const)() const, const std::__1::tuple<std::__1::placeholders::__ph<1> >, std::__1::tuple<A_void_1 &>, false>'</div>

<div>         operator()(_Args&& ...__args) const</div><div>         ^</div><div> invoke_lvalue.pass.cpp:121:5: error: no matching function for call to object of type '__bind<void (A_void_1::*&)() const, std::__1::placeholders::__ph<1> &>'</div>

<div>     std::bind(fp, _1)(ap);</div><div>     ^~~~~~~~~~~~~~~~~</div><div> /home/abuild/rpmbuild/BUILD/libcxx/include/functional:2084:9: note: candidate template ignored: substitution failure [with _Args = <A_void_1 *&>]: implicit instantiation of undefined template 'std::__1::__bind_return<void (A_void_1::*)() const, std::__1::tuple<std::__1::placeholders::__ph<1> >, std::__1::tuple<A_void_1 *&>, false>'</div>

<div>         operator()(_Args&& ...__args)</div><div>         ^</div><div> /home/abuild/rpmbuild/BUILD/libcxx/include/functional:2093:9: note: candidate template ignored: substitution failure [with _Args = <A_void_1 *&>]: implicit instantiation of undefined template 'std::__1::__bind_return<void (A_void_1::*const)() const, const std::__1::tuple<std::__1::placeholders::__ph<1> >, std::__1::tuple<A_void_1 *&>, false>'</div>

<div>         operator()(_Args&& ...__args) const</div><div>         ^</div><div> invoke_lvalue.pass.cpp:128:5: error: no matching function for call to object of type '__bind<void (A_void_1::*&)() const, A_void_1 &>'</div>

<div>     std::bind(fp, a)();</div><div>     ^~~~~~~~~~~~~~~~</div><div> /home/abuild/rpmbuild/BUILD/libcxx/include/functional:2084:9: note: candidate template ignored: substitution failure [with _Args = <>]: implicit instantiation of undefined template 'std::__1::__bind_return<void (A_void_1::*)() const, std::__1::tuple<A_void_1>, std::__1::tuple<>, false>'</div>

<div>         operator()(_Args&& ...__args)</div><div>         ^</div><div> /home/abuild/rpmbuild/BUILD/libcxx/include/functional:2093:9: note: candidate template ignored: substitution failure [with _Args = <>]: implicit instantiation of undefined template 'std::__1::__bind_return<void (A_void_1::*const)() const, const std::__1::tuple<A_void_1>, std::__1::tuple<>, false>'</div>

<div>         operator()(_Args&& ...__args) const</div><div>         ^</div><div> invoke_lvalue.pass.cpp:132:5: error: no matching function for call to object of type '__bind<void (A_void_1::*&)() const, A_void_1 *&>'</div>

<div>     std::bind(fp, ap)();</div><div>     ^~~~~~~~~~~~~~~~~</div><div> /home/abuild/rpmbuild/BUILD/libcxx/include/functional:2084:9: note: candidate template ignored: substitution failure [with _Args = <>]: implicit instantiation of undefined template 'std::__1::__bind_return<void (A_void_1::*)() const, std::__1::tuple<A_void_1 *>, std::__1::tuple<>, false>'</div>

<div>         operator()(_Args&& ...__args)</div><div>         ^</div><div> /home/abuild/rpmbuild/BUILD/libcxx/include/functional:2093:9: note: candidate template ignored: substitution failure [with _Args = <>]: implicit instantiation of undefined template 'std::__1::__bind_return<void (A_void_1::*const)() const, const std::__1::tuple<A_void_1 *>, std::__1::tuple<>, false>'</div>

<div>         operator()(_Args&& ...__args) const</div><div>         ^</div></div><div><br></div><div>Since the tests are not really changed, could this be a clang regression?</div><div><br></div></div>