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