gcc/testsuite/g++.dg/cpp2a/concepts-lambda19.C
raw| 1 | // PR c++/103706 |
| 2 | // { dg-do compile { target c++20 } } |
| 3 | |
| 4 | template<class T> concept C = __is_same(T, int); |
| 5 | |
| 6 | template<class... Ts> void f() { |
| 7 | ([]() requires C<Ts> { return Ts(); }(), ...); // { dg-error "no match" } |
| 8 | } |
| 9 | |
| 10 | template void f<int, int, int>(); // { dg-bogus "" } |
| 11 | template void f<int, int, char>(); // { dg-message "required from here" } |