brintos

brintos / llvm-project-archived public Read only

0
0
Text · 727 B · 7cffb35 Raw
22 lines · cpp
1// RUN: %clang_cc1 -verify -std=c++20 -fsyntax-only %s2 3auto 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 19void foo() {20  c1(true)(1.0)(); // expected-error{{no matching function for call to object of type}}21}22