[libcxx-commits] [PATCH] D146066: [libc++][spaceship] Implement `operator<=>` for `queue`

Hristo Hristov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 1 11:06:29 PDT 2023


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


================
Comment at: libcxx/test/std/containers/container.adaptors/queue/compare.three_way.pass.cpp:25
+  assert((test_ordered_container_adaptor_spaceship<std::queue, std::deque>()));
+  assert((test_ordered_container_adaptor_spaceship<std::queue, std::list>()));
+  // `std::queue` is not constexpr, so no `static_assert` test here.
----------------
philnik wrote:
> We should also test with a custom container to make sure it actually calls `operator<=>` and not `std::lexicographical_compare_three_way(x.begin(), x.end(), y.begin(), y.end())`.
I added a "custom container" test I hope that it is custom enough.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146066/new/

https://reviews.llvm.org/D146066



More information about the libcxx-commits mailing list