@@ -34,27 +34,26 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __for_each(_InputIterat
34
34
35
35
// __segment_processor handles the per-segment processing by applying the function object __func_ to each
36
36
// element within the segment.
37
- template <class _SegmentedIterator , class _Func >
37
+ template <class _Func >
38
38
struct __segment_processor {
39
- using _Traits _LIBCPP_NODEBUG = __segmented_iterator_traits<_SegmentedIterator>;
40
-
41
39
_Func& __func_;
42
40
43
41
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __segment_processor (_Func& __f) : __func_(__f) {}
44
42
43
+ template <class _SegmentedIterator >
45
44
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
46
- operator ()(typename _Traits::__local_iterator __lfirst, typename _Traits::__local_iterator __llast) {
45
+ operator ()(typename __segmented_iterator_traits<_SegmentedIterator>::__local_iterator __lfirst,
46
+ typename __segmented_iterator_traits<_SegmentedIterator>::__local_iterator __llast) {
47
47
std::__for_each (__lfirst, __llast, __func_);
48
48
}
49
49
};
50
50
51
51
template <class _SegmentedIterator ,
52
52
class _Function ,
53
53
__enable_if_t <__is_segmented_iterator<_SegmentedIterator>::value, int > = 0 >
54
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Function
55
- __for_each (_SegmentedIterator __first, _SegmentedIterator __last, _Function __func) {
56
- std::__for_each_segment (__first, __last, std::__segment_processor<_SegmentedIterator, _Function>(__func));
57
- return __func;
54
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
55
+ __for_each (_SegmentedIterator __first, _SegmentedIterator __last, _Function& __func) {
56
+ std::__for_each_segment (__first, __last, std::__segment_processor<_Function>(__func));
58
57
}
59
58
60
59
template <class _InputIterator , class _Function >
0 commit comments