Debian Codegraph @

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

raw
1 // PR c++/92838
2 // { dg-do compile { target c++20 } }
3
4 template<int N>
5 auto foo()
6 {
7 [] () requires (N != 0) { }(); // { dg-error "no match" }
8 [] () requires (N == 0) { }();
9
10 [] <int M=1> () requires (N == M) { }(); // { dg-error "no match" }
11 [] <int M=1> () requires (N != M) { }();
12 }
13
14 void bar()
15 {
16 foo<0>();
17 }