1 // RUN: %clang_cc1 -verify -std=c++20 -fsyntax-only %s
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
...)) {};
20 c1(true)(1.0)(); // expected-error{{no matching function for call to object of type}}