[libcxx-commits] [PATCH] D150831: [libc++] Implement ranges::ends_with

Zijun Zhao via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jul 21 22:33:13 PDT 2023


ZijunZhao updated this revision to Diff 543149.
ZijunZhao marked 2 inline comments as done.
ZijunZhao added a comment.

1. If we can get the size of input directly, get it, then compare the sizes and return the result in some cases. Otherwise, go to step2.
2. If the input is bidirectional, go to __bidirectional_impl() directly. If not, go to step 3
3. Call ranges::equal() to get the result


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150831

Files:
  libcxx/include/CMakeLists.txt
  libcxx/include/__algorithm/ranges_ends_with.h
  libcxx/include/algorithm
  libcxx/include/module.modulemap.in
  libcxx/test/libcxx/algorithms/ranges_robust_against_copying_comparators.pass.cpp
  libcxx/test/libcxx/algorithms/ranges_robust_against_copying_projections.pass.cpp
  libcxx/test/libcxx/private_headers.verify.cpp
  libcxx/test/std/algorithms/alg.nonmodifying/alg.ends_with/ranges.ends_with.pass.cpp
  libcxx/test/std/algorithms/ranges_robust_against_differing_projections.pass.cpp
  libcxx/test/std/algorithms/ranges_robust_against_nonbool_predicates.pass.cpp
  libcxx/test/std/algorithms/ranges_robust_against_omitting_invoke.pass.cpp
  libcxx/test/std/algorithms/ranges_robust_against_proxy_iterators.pass.cpp
  libcxx/test/std/library/description/conventions/customization.point.object/niebloid.compile.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150831.543149.patch
Type: text/x-patch
Size: 27436 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230722/1c7bfcf5/attachment-0001.bin>


More information about the libcxx-commits mailing list