tmp/tmpwlzelwu9/{from.md → to.md}
RENAMED
|
@@ -1,30 +1,29 @@
|
|
| 1 |
-
### Input iterators <a id="input.iterators">[[input.iterators]]</a>
|
| 2 |
|
| 3 |
-
A class or pointer type `X`
|
| 4 |
-
|
| 5 |
-
[[iterator.iterators]]
|
| 6 |
-
[[
|
| 7 |
-
[[
|
| 8 |
-
semantics.
|
| 9 |
|
| 10 |
-
In
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
|
| 17 |
[*Example 1*: The call `find(a,b,x)` is defined only if the value of
|
| 18 |
`a` has the property *p* defined as follows: `b` has property *p* and a
|
| 19 |
value `i` has property *p* if (`*i==x`) or if (`*i!=x` and `++i` has
|
| 20 |
property *p*). — *end example*]
|
| 21 |
|
| 22 |
[*Note 1*: For input iterators, `a == b` does not imply `++a == ++b`.
|
| 23 |
(Equality does not guarantee the substitution property or referential
|
| 24 |
transparency.) Algorithms on input iterators should never attempt to
|
| 25 |
pass through the same iterator twice. They should be *single pass*
|
| 26 |
-
algorithms. Value type `T` is not required to be a
|
| 27 |
-
(
|
| 28 |
istreams as the source of the input data through the `istream_iterator`
|
| 29 |
class template. — *end note*]
|
| 30 |
|
|
|
|
| 1 |
+
#### Input iterators <a id="input.iterators">[[input.iterators]]</a>
|
| 2 |
|
| 3 |
+
A class or pointer type `X` meets the requirements of an input iterator
|
| 4 |
+
for the value type `T` if `X` meets the *Cpp17Iterator*
|
| 5 |
+
[[iterator.iterators]] and *Cpp17EqualityComparable* (
|
| 6 |
+
[[cpp17.equalitycomparable]]) requirements and the expressions in
|
| 7 |
+
[[inputiterator]] are valid and have the indicated semantics.
|
|
|
|
| 8 |
|
| 9 |
+
In [[inputiterator]], the term *the domain of `==`* is used in the
|
| 10 |
+
ordinary mathematical sense to denote the set of values over which `==`
|
| 11 |
+
is (required to be) defined. This set can change over time. Each
|
| 12 |
+
algorithm places additional requirements on the domain of `==` for the
|
| 13 |
+
iterator values it uses. These requirements can be inferred from the
|
| 14 |
+
uses that algorithm makes of `==` and `!=`.
|
| 15 |
|
| 16 |
[*Example 1*: The call `find(a,b,x)` is defined only if the value of
|
| 17 |
`a` has the property *p* defined as follows: `b` has property *p* and a
|
| 18 |
value `i` has property *p* if (`*i==x`) or if (`*i!=x` and `++i` has
|
| 19 |
property *p*). — *end example*]
|
| 20 |
|
| 21 |
[*Note 1*: For input iterators, `a == b` does not imply `++a == ++b`.
|
| 22 |
(Equality does not guarantee the substitution property or referential
|
| 23 |
transparency.) Algorithms on input iterators should never attempt to
|
| 24 |
pass through the same iterator twice. They should be *single pass*
|
| 25 |
+
algorithms. Value type `T` is not required to be a *Cpp17CopyAssignable*
|
| 26 |
+
type ([[cpp17.copyassignable]]). These algorithms can be used with
|
| 27 |
istreams as the source of the input data through the `istream_iterator`
|
| 28 |
class template. — *end note*]
|
| 29 |
|