[libcxx-commits] [PATCH] D127130: [libc++] Implement ranges::lexicographical_compare

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 13 10:34:51 PDT 2022


philnik added inline comments.


================
Comment at: libcxx/test/std/algorithms/alg.sorting/alg.lex.comparison/ranges.lexicographical_compare.pass.cpp:189
+      int a[] = {1, 2, 3, 4, 5};
+      auto ret = std::ranges::lexicographical_compare(std::begin(a), std::end(a), std::begin(a), std::end(a), pred, proj1, proj2);
+      assert(!ret);
----------------
var-const wrote:
> Question: why is `std::begin` necessary here?
It's not necessary, but I think `std::begin` and `std::end` should always go together. It is just another thing you have to think about otherwise.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127130



More information about the libcxx-commits mailing list