xref: /llvm-project/clang/test/SemaCXX/pr64462.cpp (revision 548d67a0393c7bd200e335ada0a3d684750c2697)
1 // RUN: %clang_cc1 -verify -std=c++20 -fsyntax-only %s
2 
c1(auto f,auto...fs)3 auto c1(auto f, auto ...fs) {
4   constexpr bool a = true;
5   return [](auto) requires a {
6     constexpr bool b = true;
7     return []() requires a && b {
8       constexpr bool c = true;
9       return [](auto) requires a && b && c {
10         constexpr bool d = true;
11         // expected-note@+2{{because substituted constraint expression is ill-formed: no matching function for call to 'c1'}}
12         // expected-note@+1{{candidate function not viable: constraints not satisfied}}
13         return []() requires a && b && c && d && (c1(fs...)) {};
14       };
15     }();
16   }(1);
17 }
18 
foo()19 void foo() {
20   c1(true)(1.0)(); // expected-error{{no matching function for call to object of type}}
21 }
22