aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-lambda19.C
blob: 1921f4892fd243d0cc5c751c55a6a2ce85d7de67 (plain)
1
2
3
4
5
6
7
8
9
10
11
// PR c++/103706
// { dg-do compile { target c++20 } }

template<class T> concept C = __is_same(T, int);

template<class... Ts> void f() {
  ([]() requires C<Ts> { return Ts(); }(), ...); // { dg-error "no match" }
}

template void f<int, int, int>(); // { dg-bogus "" }
template void f<int, int, char>(); // { dg-message "required from here" }