[libcxx-commits] [PATCH] D93557: [libc++] [P0879] constexpr std::nth_element, and rewrite its tests.
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 4 15:20:10 PST 2021
Quuxplusone added inline comments.
================
Comment at: libcxx/include/algorithm:5466
{
+ if (++__j == __last)
+ // [__i, __last) sorted
----------------
This was the bug. `while (++__j != __last)` should have changed to `while (true)`, if I was going to repeat the condition here.
However, I've got a better patch now anyway, which I'm posting as D96084.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93557/new/
https://reviews.llvm.org/D93557
More information about the libcxx-commits
mailing list