[libcxx-commits] [PATCH] D93443: [libc++] [P0879] constexpr reverse, partition, *_permutation

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Dec 16 21:40:52 PST 2020


Quuxplusone created this revision.
Quuxplusone added a reviewer: ldionne.
Quuxplusone added a project: libc++.
Quuxplusone requested review of this revision.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

I have temporarily rolled the heap/partial_sort constexprization into this PR, just to get early warning if the buildbot doesn't like what I did for some reason. However, the existing tests for those algorithms use `shuffle`, which isn't constexpr-friendly. Therefore I'm planning to eliminate those changes from this PR before landing it; and I'll open a new PR sometime later with the heap/partial_sort algorithms and completely rewritten tests for those algorithms.

After this patch, the only parts of P0879 that remain missing will be std::nth_element, std::sort, and the heap/partial_sort algorithms.
std::nth_element will be easy (but again its existing tests use `shuffle`). std::sort may be interesting, I'm not sure yet.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93443

Files:
  libcxx/include/algorithm
  libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp
  libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp
  libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/next_permutation.pass.cpp
  libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/next_permutation_comp.pass.cpp
  libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/prev_permutation.pass.cpp
  libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/prev_permutation_comp.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93443.312375.patch
Type: text/x-patch
Size: 13116 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201217/9bfb836a/attachment.bin>


More information about the libcxx-commits mailing list