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

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 1 12:37:11 PDT 2023


Mordante added a comment.

In general I'm happy, but I would like to see whether `custom_container_iterator` can be removed.



================
Comment at: libcxx/test/support/test_container_comparisons.h:25
+template <typename T>
+class custom_container_iterator : public std::list<T>::iterator {};
+
----------------
Would it be possible to use `nasty_vector` from "nasty_containers.h" instead?

You will need to add 
```
#if TEST_STD_VER >= 20
template <class T>
auto operator<=>(const nasty_vector<T>& x, const nasty_vector<T>& y) { return x.v_ <=> y.v_; }
#endif
```
but that seems easier than to add a new class.


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