[Bug c++/123611] [reflection] bogus consteval-only expressions are only allowed in a constant-evaluated context
katzdm at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Jan 15 22:38:37 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123611
Daniel Katz <katzdm at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |katzdm at gmail dot com
--- Comment #1 from Daniel Katz <katzdm at gmail dot com> ---
I think this is probably CWG3131 (or one of the related ones), as I think this
is the minimal repro:
```
#include <array>
void f() {
static constexpr std::array arr2 = {^^int, ^^bool};
template for (constexpr auto Pair : arr2) { }
}
```
https://godbolt.org/z/z8Y46bfrz
More information about the Gcc-bugs
mailing list