[libcxx-commits] [PATCH] D123681: [libc++] Implement ranges::equal

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 26 08:30:36 PDT 2022


Mordante added inline comments.


================
Comment at: libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/ranges.equal.pass.cpp:196
+  { // check that the complexity requirements are met
+    { // different size
+      {
----------------
philnik wrote:
> Mordante wrote:
> > This misses the tests when the input isn't a `size_sentinel_for` or a `sized_range`.
> I don't think there is anything interesting about them. IIUC in theory an implementation could still not call the projections or predicates if it magically knows that it's iterating over two arrays of different sizes.
I think the interesting part is that we now have an untested code path. Not that I expect errors, but it would be good to add a test.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123681



More information about the libcxx-commits mailing list