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

--- Comment #14 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Not in general, no, it doesn't have to always give a compile-time answer. But I
believe the library intent is that when it compares compile-time constant
pointers, it should give that answer at compile-time, and it should be a toral
order. What seems to be suggested by that comment is that since it's possible
to compare compile-time constant pointers and run-time values with this
function, and it can't know (definition-wise) whether the incoming arguments
are constants or not, we could just as well drop the constexpr completely from
the pointer specialization of std::less, as that will then open the door to
simply reinterpret_cast in it. None of that has been confirmed by LWG, though.

Reply via email to