| 1 |
// PR c++/117898 |
| 2 |
// { dg-do compile { target c++26 } } |
| 3 |
|
| 4 |
void |
| 5 |
ICE (auto... args) |
| 6 |
{ |
| 7 |
[&]<int idx>() { |
| 8 |
using R = decltype(args...[idx]); // { dg-error "cannot index an empty pack" } |
| 9 |
}.template operator()<0>(); |
| 10 |
} |
| 11 |
|
| 12 |
void |
| 13 |
g () |
| 14 |
{ |
| 15 |
ICE(); // empty pack |
| 16 |
} |