[libcxx-commits] [PATCH] D145285: [libc++] Refactor __less

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jun 2 10:54:38 PDT 2023


ldionne accepted this revision.
ldionne added inline comments.


================
Comment at: libcxx/include/__algorithm/sort.h:888
+_LIBCPP_HIDE_FROM_ABI void __sort_dispatch(_Type* __first, _Type* __last, __less<>& __comp) {
   std::__sort<__less<_Type>&, _Type*>(__first, __last, __comp);
 }
----------------



================
Comment at: libcxx/include/__algorithm/sort.h:894
   __less<_Type> __comp;
   std::__sort<__less<_Type>&, _Type*>(__first, __last, __comp);
 }
----------------



================
Comment at: libcxx/include/__algorithm/sort.h:901
   __less<_Type> __comp;
   std::__sort<__less<_Type>&, _Type*>(__first, __last, __comp);
 }
----------------



================
Comment at: libcxx/include/__algorithm/sort.h:909
   __less<_Type> __comp;
   std::__sort<__less<_Type>&, _Type*>(__first, __last, __comp);
 }
----------------



================
Comment at: libcxx/test/libcxx/algorithms/robust_against_using_non_transparent_comparators.pass.cpp:8
+//===----------------------------------------------------------------------===//
+
+#include <algorithm>
----------------
Let's add a comment explaining what this test does, in particular the fact that this is technically not mandated by the standard but we provide it as QOI.


================
Comment at: libcxx/test/libcxx/algorithms/robust_against_using_non_transparent_comparators.pass.cpp:28
+
+    operator T&() const;
+  };
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145285



More information about the libcxx-commits mailing list