[libcxx-commits] [libcxx] [libc++] Optimize ranges::{for_each, for_each_n} for segmented iterators (PR #132896)
Peng Liu via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Apr 3 09:49:11 PDT 2025
================
@@ -34,6 +45,17 @@ for_each_n(_InputIterator __first, _Size __orig_n, _Function __f) {
return __first;
}
+template <class _SegmentedIterator,
+ class _Size,
+ class _Function,
+ __enable_if_t<__is_segmented_iterator<_SegmentedIterator>::value &&
+ __has_forward_iterator_category<_SegmentedIterator>::value,
----------------
winner245 wrote:
Done!
https://github.com/llvm/llvm-project/pull/132896
More information about the libcxx-commits
mailing list