[libcxx-commits] [PATCH] D111514: [libc++] [P1614] Implement the second half of [cmp.alg]: compare_{strong, weak, partial}_fallback.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 11 10:15:43 PDT 2021


Mordante added inline comments.


================
Comment at: libcxx/docs/Status/SpaceshipProjects.csv:10
 | `weak_order <https://reviews.llvm.org/D107036>`_
-| `partial_order <https://reviews.llvm.org/D107036>`_",None,Arthur O'Dwyer,|In Progress|
+| `partial_order <https://reviews.llvm.org/D107036>`_",None,Arthur O'Dwyer,|Complete|
 | `[alg.three.way] <https://wg21.link/alg.three.way>`_,| `lexicographical_compare_three_way <https://reviews.llvm.org/D80902>`_,[comparisons.three.way],Christopher Di Bella,|In Progress|
----------------
Please add a note that `long double` isn't implemented yet.


================
Comment at: libcxx/include/__compare/compare_partial_order_fallback.h:55
+                               _VSTD::forward<_Ep>(__e) < _VSTD::forward<_Fp>(__f) ? partial_ordering::less :
+                               _VSTD::forward<_Fp>(__f) < _VSTD::forward<_Ep>(__e) ? partial_ordering::greater :
+                               partial_ordering::unordered;
----------------
The same argument can be forwarded multiple times. Can that give an issue with some evil rvalue comparison operators?


================
Comment at: libcxx/test/std/language.support/cmp/cmp.alg/compare_partial_order_fallback.pass.cpp:46
+{
+    // If the decayed types of E and F differ, weak_order(E, F) is ill-formed.
+
----------------
s/weak_order/partial_order/


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111514



More information about the libcxx-commits mailing list