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

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jun 3 07:03:48 PDT 2023


Mordante accepted this revision.
Mordante added a comment.
This revision is now accepted and ready to land.

LGTM after addressing the review comments.



================
Comment at: libcxx/include/stack:94
+  compare_three_way_result_t<Container>
+    operator<=>(const stack<T, Container>& x, const stack<T, Container>& y); // since C++20
 
----------------
I miss an update of `SpaceshipProjects.csv`


================
Comment at: libcxx/include/stack:357
+operator<=>(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) {
+    return __x.__get_container() <=> __y.__get_container();
+}
----------------
If possible we prefer to do exactly what the Standard says. This is consistent with `operator==` and `operator<`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146094



More information about the libcxx-commits mailing list