https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126137
Bug ID: 126137
Summary: [reflection] ICE on assigment std::tuple to constexpr
structured binding pack
Product: gcc
Version: 16.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: kengusername at proton dot me
Target Milestone: ---
This program fails to compile on gcc 16.1
https://godbolt.org/z/88MhGferG
```
#include <tuple>
template<auto = 0> consteval auto gen2() {
static constexpr auto [...namestmp] = std::tuple{^^::};
return 0;
}
constexpr auto f = gen2();
```
As mentioned in summary this only happens in constexpr structured binding pack,
so
https://godbolt.org/z/413cozs93
```
#include <tuple>
template<auto = 0> consteval auto gen2() {
auto [...namestmp] = std::tuple{^^::};
return 0;
}
constexpr auto f = gen2();
```
compiles as expected