[libcxx-commits] [PATCH] D148416: [libc++][spaceship] Implement `operator<=>` for `multiset` and `set`
Hristo Hristov via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon May 22 13:43:30 PDT 2023
H-G-Hristov added inline comments.
================
Comment at: libcxx/test/support/test_comparisons.h:265
friend constexpr std::partial_ordering operator<=>(PartialOrder lhs, PartialOrder rhs) {
- if (lhs.value == std::numeric_limits<int>::min() || rhs.value == std::numeric_limits<int>::min())
+ if (lhs.value == UnorderableIntMin || rhs.value == UnorderableIntMin)
+ return std::partial_ordering::unordered;
----------------
Mordante wrote:
> I actually feel `std::numeric_limits<int>::min()` is more readable. Especially since the name kind of indicates it's not a plain `std::numeric_limits<int>::min()`. So I really like this part reverted and use the numeric_limits directly.
Removed both variables from above.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148416/new/
https://reviews.llvm.org/D148416
More information about the libcxx-commits
mailing list