I don’t think there’s a clear answer to the question that you’re asking. This is a specific case of LWG 2833: marking a library function constexpr
does not explain the circumstances under which calling the function will yield a constant expression.
Until this issue is resolved, I think you simply cannot rely on std::less
being able to compare unrelated pointers at compile time.