https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111379
Xi Ruoyao <xry111 at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xry111 at gcc dot gnu.org --- Comment #2 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- (In reply to Jiang An from comment #1) > There's (or will be) a new DR CWG2749 which tentatively ready now. > https://cplusplus.github.io/CWG/issues/2749.html > > It seems that the old resolution in CWG2526 was wrong, and the comparison > should be constexpr-friendly. > > BTW I don't think there was anything specifying that "the comparison would > have *undefined* behaviour" before CWG2526. It is (or was) unspecified, not undefined. And the standard explicitly disallows "a relational operator where the result is unspecified" in [expr.const].