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

--- Comment #17 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
(In reply to Jens Maurer from comment #16)
> I'd like to point out that there is no prohibition against writing
> reinterpret_cast inside a constexpr function. It's just if you call that
> function and actually evaluate the reinterpret_cast does the expression turn
> into an expression that is not a constant expression.

In this case, it violates [dcl.constexpr]/5, so the function definition
would be ill-formed NDR.

Reply via email to