[libcxx-commits] [PATCH] D80904: [libcxx] adds spaceship for vector

Michael Schellenberger Costa via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun May 31 23:57:33 PDT 2020


miscco added inline comments.


================
Comment at: libcxx/include/compare:679
 
+#if !defined(_LIBCPP_HAS_NO_SPACESHIP_OPERATOR)
+inline constexpr auto __synth_three_way = []<class T, class U>(const T& t, const U& u)
----------------
This is usually spelled as `ifndef _LIBCPP_HAS_NO_SPACESHIP_OPERATOR`


================
Comment at: libcxx/include/compare:686
+    } else {
+        if (t < u) return weak_ordering::less;
+        if (u < t) return weak_ordering::greater;
----------------
I have to look it up but what about string orderings here?


================
Comment at: libcxx/include/vector:3339
 
+#if !defined(_LIBCPP_HAS_NO_SPACESHIP_OPERATOR)
+template <class _Tp, class _Allocator>
----------------
Same here `#ifndef _LIBCPP_HAS_NO_SPACESHIP_OPERATOR`


Repository:
  rCXX libc++

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

https://reviews.llvm.org/D80904





More information about the libcxx-commits mailing list