[libcxx-commits] [libcxx] [libc++] Optimize ranges::{for_each, for_each_n} for segmented iterators (PR #132896)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 27 06:40:46 PDT 2025
================
@@ -26,28 +26,43 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _InputIterator, class _Function>
+template <class, class _InputIterator, class _Sent, class _Function>
----------------
ldionne wrote:
It seems that passing an algorithm policy is not necessary here, since we don't need anything that depends on it (such as `iter_swap` or something like that). When that's the case, we generally omit passing an `_AlgPolicy` as a parameter since fewer template parameters mean that there's less template bloat.
https://github.com/llvm/llvm-project/pull/132896
More information about the libcxx-commits
mailing list