[libcxx-commits] [PATCH] D139554: [libc++] Forward to std::memcmp for trivially comparable types in equal

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 17 03:43:45 PST 2023


philnik added inline comments.


================
Comment at: libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp:15
 //   equal(Iter1 first1, Iter1 last1, Iter2 first2);
 //
 // Introduced in C++14:
----------------
ldionne wrote:
> Please make sure to test with an `identity` projection in `ranges::equal`, and also with `std::equal_to<>` and `ranges::equal_to<>`. Otherwise, the actual improvements you make in this patch are not tested.
`ranges::equal` with `identity` and `ranges::equal_to` is checked in `ranges.equal.pass.cpp`. We don't have a negative test though, added one. I've added also tests with `std::equal_to<>`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139554



More information about the libcxx-commits mailing list