[libcxx-commits] [libcxx] [libc++] Optimize search_n (PR #171389)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 10 07:39:35 PST 2025
================
@@ -142,7 +136,16 @@ template <class _ForwardIterator, class _Size, class _Tp, class _BinaryPredicate
static_assert(
__is_callable<_BinaryPredicate&, decltype(*__first), const _Tp&>::value, "The comparator has to be callable");
auto __proj = __identity();
- return std::__search_n_impl(__first, __last, std::__convert_to_integral(__count), __value, __pred, __proj).first;
+ return std::__rewrap_iter(
----------------
ldionne wrote:
Seems like that is not necessary.
https://github.com/llvm/llvm-project/pull/171389
More information about the libcxx-commits
mailing list