tmp/tmp9v2so7sx/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Overview <a id="range.stride.overview">[[range.stride.overview]]</a>
|
| 2 |
+
|
| 3 |
+
`stride_view` presents a view of an underlying sequence, advancing over
|
| 4 |
+
n elements at a time, as opposed to the usual single-step succession.
|
| 5 |
+
|
| 6 |
+
The name `views::stride` denotes a range adaptor object
|
| 7 |
+
[[range.adaptor.object]]. Given subexpressions `E` and `N`, the
|
| 8 |
+
expression `views::stride(E, N)` is expression-equivalent to
|
| 9 |
+
`stride_view(E, N)`.
|
| 10 |
+
|
| 11 |
+
[*Example 1*:
|
| 12 |
+
|
| 13 |
+
``` cpp
|
| 14 |
+
auto input = views::iota(0, 12) | views::stride(3);
|
| 15 |
+
ranges::copy(input, ostream_iterator<int>(cout, " ")); // prints 0 3 6 9
|
| 16 |
+
ranges::copy(input | views::reverse, ostream_iterator<int>(cout, " ")); // prints 9 6 3 0
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
— *end example*]
|
| 20 |
+
|