| 1 |
// { dg-do compile { target c++20 } } |
| 2 |
|
| 3 |
template <class T> |
| 4 |
void foo(T x) { |
| 5 |
sizeof []<int=0>(T=x) { return 0; }(); // { dg-error "may not appear" } |
| 6 |
sizeof [](T=x) { return 0; }(); // { dg-error "may not appear" } |
| 7 |
}; |
| 8 |
|
| 9 |
void test() { |
| 10 |
foo(0); |
| 11 |
} |