[libcxx-commits] [PATCH] D80902: [libcxx] adds lexicographical_compare_three_way
Christopher Di Bella via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Jun 13 19:13:02 PDT 2020
cjdb marked 2 inline comments as done.
cjdb added inline comments.
================
Comment at: libcxx/include/algorithm:5627
+// lexicographical_compare_three_way
+#ifndef _LIBCPP_HAS_NO_SPACESHIP_OPERATOR
+template <class _InputIterator1, class _InputIterator2, class _Compare>
----------------
EricWF wrote:
> blank line after after the `#ifdef`.
>
> We should also gate this on the standard dialect, because three way comparison can be enabled as an extension.
I think I've done this one?
================
Comment at: libcxx/include/compare:644
constexpr _CCC _Cat = sizeof...(_Ts) == 0 ? _StrongOrd
- : __compute_comp_type(__type_kinds);
+ : __compute_comp_type<sizeof...(_Ts)>(__type_kinds);
if constexpr (_Cat == _None)
----------------
curdeius wrote:
> Nit: you could avoid passing the size explicitly if you passed the array by reference.
I did that at first, but apparently sizeof...(_Ts) can be 0.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80902/new/
https://reviews.llvm.org/D80902
More information about the libcxx-commits
mailing list