[Bug c++/123611] [reflection] bogus consteval-only expressions are only allowed in a constant-evaluated context
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 15 22:43:26 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123611
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Daniel Katz from comment #1)
> 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
For CWG3131 there is
https://gcc.gnu.org/pipermail/gcc-patches/2025-November/700762.html patch
pending review.
More information about the Gcc-bugs
mailing list