Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/concepts-err2.C

raw
1 // PR c++/95735
2 // { dg-do compile { target concepts } }
3
4 template <auto F>
5 requires requires { F(); }
6 bool v{};
7
8 void f() {
9 int x;
10 static_assert(v<[&] { x++; }>); // { dg-error "not a constant expression" }
11 }