[Bug libstdc++/78420] [5/6/7 Regression] std::less<T*> is not a total order with -O2 enabled
ville.voutilainen at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Jan 23 22:49:00 GMT 2017
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.
More information about the Gcc-bugs
mailing list