Is std::less supposed to allow comparison of unrelated pointers at compile-time?

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.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)