Revert "Revert "[libc++] [P0879] constexpr std::nth_element, and rewrite its tests.""
authorArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Thu, 4 Feb 2021 23:12:52 +0000 (18:12 -0500)
committerArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Fri, 5 Feb 2021 17:02:43 +0000 (12:02 -0500)
commit5d9565634c97a075940041a6756a2583fa1f0bc9
treef3cf012174e642b11341f95eed99706d5083e409
parentbd1009224ac1e9017815f1eadb48d8dd07d927e0
Revert "Revert "[libc++] [P0879] constexpr std::nth_element, and rewrite its tests.""

This reverts commit b6ffece32035a90d181101f356bd9c04ea1d3122.

The bug is now fixed (it was a stupid cut-and-paste kind of error),
and the regression test added. The new patch is also simpler than the old one!

Differential Revision: https://reviews.llvm.org/D96084
libcxx/include/algorithm
libcxx/test/std/algorithms/alg.sorting/alg.nth.element/nth_element.pass.cpp
libcxx/test/std/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp