[range.stride.overview] (original) (raw)
25 Ranges library [ranges]
25.7 Range adaptors [range.adaptors]
25.7.32 Stride view [range.stride]
25.7.32.1 Overview [range.stride.overview]
stride_view presents a view of an underlying sequence, advancing over n elements at a time, as opposed to the usual single-step succession.
Given subexpressions E and N, the expression views::stride(E, N)is expression-equivalent to stride_view(E, N).
[Example 1: auto input = views::iota(0, 12) | views::stride(3); ranges::copy(input, ostream_iterator<int>(cout, " ")); ranges::copy(input | views::reverse, ostream_iterator<int>(cout, " ")); — _end example_]