A LegacyInputIterator is a LegacyIterator that can read from the pointed-to element. LegacyInputIterators only guarantee validity for single pass algorithms: once a LegacyInputIterator
i has been incremented, all copies of its previous value may be invalidated.
It satisfies LegacyInputIterator if.
j, values of type
reference, the type denoted by
value_type, the type denoted by
The following expressions must be valid and have their specified effects.
|Expression||Return type||Equivalent expression||Notes|
| ||contextually convertible to || ||
| || ||
| || ||
Postcondition: Any copies of the previous value of
| || |
| ||convertible to ||
"in the domain of
==" means equality comparison is defined between the two iterator values. For input iterators, equality comparison does not need to be defined for all values, and the set of the values in the domain of
== may change over time.
reference type for an input iterator that is not also a LegacyForwardIterator does not have to be a reference type: dereferencing an input iterator may return a proxy object or
value_type itself by value (as in the case of
For the definition of
where the exposition-only concept
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
|DR||Applied to||Behavior as published||Correct behavior|
|LWG 98||C++98|| the return type of || it can be any type convertible to
| specifies that a type is an input iterator, that is, its referenced values can be read and it can be both pre- and post-incremented
|Iterator library||provides definitions for iterators, iterator traits, adaptors, and utility functions|
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.