aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-lambda11.C
blob: dd9cd4e2344492dafa6a948ce61e40aafd7a6270 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/92838
// { dg-do compile { target c++20 } }

template<int N>
auto foo()
{
  [] () requires (N != 0) { }(); // { dg-error "no match" }
  [] () requires (N == 0) { }();

  [] <int M=1> () requires (N == M) { }(); // { dg-error "no match" }
  [] <int M=1> () requires (N != M) { }();
}

void bar()
{
  foo<0>();
}