[libcxx-commits] [PATCH] D130116: [libc++][ranges] implement `std::ranges::includes`

Konstantin Varlamov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jul 20 23:12:41 PDT 2022


var-const accepted this revision.
var-const added a comment.
This revision is now accepted and ready to land.

Thanks for addressing the feedback!



================
Comment at: libcxx/test/std/algorithms/alg.sorting/alg.set.operations/includes/ranges_includes.pass.cpp:240
 constexpr bool test() {
-  // TODO: main tests.
-  // TODO: A custom comparator works.
-  // TODO: A custom projection works.
+  withAllPermutationsOfIter1AndIter2<std::type_identity_t>();
+  withAllPermutationsOfIter1AndIter2<sentinel_wrapper>();
----------------
This is pretty neat. You could also do something like `if constexpr (std::sentinel_for<Iter2, Iter2>)` to decide whether the iterator can be used as its own sentinel type (just throwing it out there, this LGTM).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130116



More information about the libcxx-commits mailing list