[Bug c++/126124] ICE on packed structured binding through statement expression
feedabl3 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Aug 4 22:44:04 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126124
feedable <feedabl3 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |feedabl3 at gmail dot com
--- Comment #1 from feedable <feedabl3 at gmail dot com> ---
Same is reproducible with IILE:
https://godbolt.org/z/sdxanhz7M
```
template<auto = 0> consteval auto foo() {
int arr[] {};
( [&]{auto [...p] = arr; p;}(), ...);
}
static_assert(foo());
```
We should probably check that the packs to be expanded are not themselves part
of the pattern.
More information about the Gcc-bugs
mailing list