- Adds operator==(partial_ordering, partial_ordering)
- Adds operator==(weak_ordering, weak_ordering)
- Adds operator==(strong_ordering, strong_ordering)
Details
- Reviewers
ldionne EricWF miscco mclow.lists BRevzin curdeius - Group Reviewers
Restricted Project - Commits
- rGec789a41e296: [libc++] Add equality for spaceship types for themselves
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This looks obviously correct.
Thanks for working on this. I have one small nit regarding whether we need all combinations for the test but feel free to ignore it. More tests are generally better that fewer.
libcxx/include/compare | ||
---|---|---|
567 | These are not part of the standard and should be handled by the rewriting of the equality operator. But definitely not part of your PR. Just raising awareness | |
libcxx/test/std/language.support/cmp/cmp.weakord/weakord.pass.cpp | ||
164 | I am wondering if we really need B != A if we already checked A != B on the library side. Can we trust the compiler to have its own valid tests? |
Thanks @miscco! Hoping this lands very soon.
NOTE: I am not a maintainer so you should hold on merging this until a maintainer greenlights it. That said this seem close to the trivially correct clause
That won't be a problem, as I don't have write access. I'll need someone to merge it on my behalf please.
libcxx/test/std/language.support/cmp/cmp.weakord/weakord.pass.cpp | ||
---|---|---|
164 | @CaseyCarter mentioned in my same_as patch that a lot of the MSVC STL type-traits tests tend to do the testing for the compiler, which is my motivation here. Also, since I expect these names to be ultimately user-defined, I wanted to be 100% sure that they're distinct. I have no issues deleting them if you've got strong feelings :) |
libcxx/test/std/language.support/cmp/cmp.weakord/weakord.pass.cpp | ||
---|---|---|
164 | I like tests. Let's keep them. |
Thanks @EricWF. Assuming your approval is synonymous with LGTM, is there anything actionable on my end before someone with write access commits it?
Is there nothing in cxx2a_status.html that needs updating? We should also update the synopsis in <compare>.
What Author Name <email> do you want this committed as?
Is there nothing in cxx2a_status.html that needs updating?
Done.
We should also update the synopsis in <compare>.
Done, possibly a bit overkill.
What Author Name <email> do you want this committed as?
Christopher Di Bella <cjdb@google.com> please.
@ldionne is there anything that remains to be done on my end, or do I just need to sit tight for now?
These are not part of the standard and should be handled by the rewriting of the equality operator. But definitely not part of your PR. Just raising awareness