std::strong_order() etc. depend on this. Let's get this shipped!
ldionne Mordante rarutyun
- Group Reviewers
- rG3df094d31eac: [libc++] [P1614] Implement std::compare_three_way.
Some steps in CI failed. I believe adding // UNSUPPORTED: libcpp-no-concepts should help
Why do we check std::compare_three_way_result_t in this test?
I would suggest to also test for std::partial_ordering::unordered and also add some tests for weak_ordering
For heterogeneous case does it make sense to put int and double in reverse order?
The Standard doesn't specify the noexcept, is this added intentionally?
Nit: the empty string isn't required in C++20.
Address review comments; add test for <functional>.
Yes, for consistency with std::less<void> etc.
Just sanity-checking. NotThreeWayComparable is an example of a type where it is legal to ask for its compare_three_way_result_t, but in fact if you try to call compare_three_way on it, it doesn't compile. (But the actual relevant test is down on line 64; I should move them closer together, but I have no good idea how to.)
Yeah, but consistency with the earlier lines (including the wonky spacing).
Bother. @ldionne, is there anything clever we could do here, to avoid splitting this one line out into a separate test marked UNSUPPORTED: libcpp-no-concepts? I'll split it out if I need to, but I'm hoping that there's a clever approach I'm forgetting about.