[libcxx-commits] [PATCH] D93557: [libc++] [P0879] constexpr std::nth_element, and rewrite its tests.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jan 28 07:44:28 PST 2021


ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.

LGTM. CI is passing due to the `extern-templates.sh.cpp` test, which I broke. Go ahead.



================
Comment at: libcxx/include/algorithm:5284
+_LIBCPP_CONSTEXPR_AFTER_CXX11 bool
+__nth_element_find_guard(_RandomAccessIterator& __i, _RandomAccessIterator& __j,
+                         _RandomAccessIterator& __m, _Compare __comp)
----------------
Would it make sense to replace this by a variant of `std::find_if`? I'd do any other refactoring in a separate patch, though, to keep this one purely mechanical.


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