[libcxx-commits] [PATCH] D129859: [libc++][ranges] Implement `ranges::{prev, next}_permutation`
Konstantin Varlamov via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jul 31 01:39:14 PDT 2022
var-const updated this revision to Diff 448841.
var-const marked an inline comment as done.
var-const added a comment.
- Make `ranges::{next,prev}_permutation` delegate to the classic algorithm;
- modify the classic `{next,prev}_permutation` and their dependencies to support `_AlgPolicy`;
- refactor and comment the test functions that run all possible permutations of a given sequence;
- increase the `constexpr` evaluation step limit for the new tests and move the `static_assert` back to `main` like in most other tests;
- add test cases with expected output;
- add tests for a custom predicate and a custom projection;
- remove the `SwapCountingIterator` and replace its usages with the existing `adl::Iterator::TrackSwaps`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129859/new/
https://reviews.llvm.org/D129859
Files:
libcxx/docs/Status/RangesAlgorithms.csv
libcxx/include/CMakeLists.txt
libcxx/include/__algorithm/iterator_operations.h
libcxx/include/__algorithm/next_permutation.h
libcxx/include/__algorithm/prev_permutation.h
libcxx/include/__algorithm/ranges_next_permutation.h
libcxx/include/__algorithm/ranges_prev_permutation.h
libcxx/include/__algorithm/reverse.h
libcxx/include/algorithm
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.sorting/alg.permutation.generators/ranges.next_permutation.pass.cpp
libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.prev_permutation.pass.cpp
libcxx/test/std/algorithms/ranges_result_alias_declarations.compile.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/support/almost_satisfies_types.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129859.448841.patch
Type: text/x-patch
Size: 50054 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220731/24901cc6/attachment-0001.bin>
More information about the libcxx-commits
mailing list