[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
Sun May 14 05:14:47 PDT 2023


H-G-Hristov marked 5 inline comments as done.
H-G-Hristov added a comment.

@Mordante Thank you for the review.



================
Comment at: libcxx/test/std/containers/associative/multiset/multiset.nonmember/compare.three_way.pass.cpp:24
+int main(int, char**) {
+  assert(test_ordered_set_container_spaceship<std::multiset>());
+  // `std::multiset` is not constexpr, so no `static_assert` test here.
----------------
Mordante wrote:
> H-G-Hristov wrote:
> > Mordante wrote:
> > > Does this also test containers where `Compare != std::less` ?
> > No. I didn't consider the other cases. What other cases would you like me to add?
> > For consistency, I will also need to update the tests for `map` in that case.
> For the generic comparison it would be good to make sure the Compare does not matter. We probably should also test that maps with different Compare or Alloc can't be compared.
I think I need a start To-Do list. Thank you for suggesting!


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