https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124219

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Isn't this behavior correct?
I mean neither of the lambdas are consteval (nor escalated to consteval), both
are (I think constexpr implicitly), the inner one is constant evaluated (but
doesn't have to be, not manifestly constant evaluated) because it is called in
initializer of a variable, but the outer one isn't, and when it isn't,
define_static_array is called with non-constant argument and as it is consteval
itself, calling it that way is invalid C++.
You really want to use consteval keywords on lambdas like that.

Reply via email to