https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121575
--- Comment #1 from Desmond Gold <cooky.ykooc922 at gmail dot com> ---
The workaround is to make the 'bar' a function template for which no error
appears:
template <int = 0>
void bar(Point p) {
template for (auto _ : {}) {
auto [x, y] = p;
}
template for (auto _ : {0}) {
auto [x, y] = p;
}
}
