tmp/tmpxmiuq9ry/{from.md → to.md}
RENAMED
|
@@ -1,15 +1,25 @@
|
|
| 1 |
#### Overview <a id="range.istream.overview">[[range.istream.overview]]</a>
|
| 2 |
|
| 3 |
`basic_istream_view` models `input_range` and reads (using `operator>>`)
|
| 4 |
successive elements from its corresponding input stream.
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
[*Example 1*:
|
| 7 |
|
| 8 |
``` cpp
|
| 9 |
auto ints = istringstream{"0 1 2 3 4"};
|
| 10 |
-
ranges::copy(
|
| 11 |
// prints 0-1-2-3-4-
|
| 12 |
```
|
| 13 |
|
| 14 |
— *end example*]
|
| 15 |
|
|
|
|
| 1 |
#### Overview <a id="range.istream.overview">[[range.istream.overview]]</a>
|
| 2 |
|
| 3 |
`basic_istream_view` models `input_range` and reads (using `operator>>`)
|
| 4 |
successive elements from its corresponding input stream.
|
| 5 |
|
| 6 |
+
The name `views::istream<T>` denotes a customization point object
|
| 7 |
+
[[customization.point.object]]. Given a type `T` and a subexpression `E`
|
| 8 |
+
of type `U`, if `U` models
|
| 9 |
+
`derived_from<basic_istream<typename U::char_type,
|
| 10 |
+
typename U::traits_type>>`, then the expression `views::istream<T>(E)`
|
| 11 |
+
is expression-equivalent to
|
| 12 |
+
`basic_istream_view<T, typename U::char_type,
|
| 13 |
+
typename U::traits_type>(E)`; otherwise, `views::istream<T>(E)` is
|
| 14 |
+
ill-formed.
|
| 15 |
+
|
| 16 |
[*Example 1*:
|
| 17 |
|
| 18 |
``` cpp
|
| 19 |
auto ints = istringstream{"0 1 2 3 4"};
|
| 20 |
+
ranges::copy(views::istream<int>(ints), ostream_iterator<int>{cout, "-"});
|
| 21 |
// prints 0-1-2-3-4-
|
| 22 |
```
|
| 23 |
|
| 24 |
— *end example*]
|
| 25 |
|