tmp/tmpeawuhvzr/{from.md → to.md}
RENAMED
|
@@ -1,22 +1,22 @@
|
|
| 1 |
#### Overview <a id="range.drop.while.overview">[[range.drop.while.overview]]</a>
|
| 2 |
|
| 3 |
-
Given a unary predicate `pred` and a
|
| 4 |
-
produces a
|
| 5 |
`ranges::end(r)`).
|
| 6 |
|
| 7 |
The name `views::drop_while` denotes a range adaptor object
|
| 8 |
[[range.adaptor.object]]. Given subexpressions `E` and `F`, the
|
| 9 |
expression `views::drop_while(E, F)` is expression-equivalent to
|
| 10 |
-
`drop_while_view
|
| 11 |
|
| 12 |
[*Example 1*:
|
| 13 |
|
| 14 |
``` cpp
|
| 15 |
-
constexpr auto source = " \t \t \t hello there";
|
| 16 |
auto is_invisible = [](const auto x) { return x == ' ' || x == '\t'; };
|
| 17 |
-
auto skip_ws =
|
| 18 |
for (auto c : skip_ws) {
|
| 19 |
cout << c; // prints hello there with no leading space
|
| 20 |
}
|
| 21 |
```
|
| 22 |
|
|
|
|
| 1 |
#### Overview <a id="range.drop.while.overview">[[range.drop.while.overview]]</a>
|
| 2 |
|
| 3 |
+
Given a unary predicate `pred` and a view `r`, `drop_while_view`
|
| 4 |
+
produces a view of the range \[`ranges::find_if_not(r, pred)`,
|
| 5 |
`ranges::end(r)`).
|
| 6 |
|
| 7 |
The name `views::drop_while` denotes a range adaptor object
|
| 8 |
[[range.adaptor.object]]. Given subexpressions `E` and `F`, the
|
| 9 |
expression `views::drop_while(E, F)` is expression-equivalent to
|
| 10 |
+
`drop_while_view(E, F)`.
|
| 11 |
|
| 12 |
[*Example 1*:
|
| 13 |
|
| 14 |
``` cpp
|
| 15 |
+
constexpr auto source = " \t \t \t hello there"sv;
|
| 16 |
auto is_invisible = [](const auto x) { return x == ' ' || x == '\t'; };
|
| 17 |
+
auto skip_ws = views::drop_while(source, is_invisible);
|
| 18 |
for (auto c : skip_ws) {
|
| 19 |
cout << c; // prints hello there with no leading space
|
| 20 |
}
|
| 21 |
```
|
| 22 |
|