
ALINK="#ff0000">
Input Iterator
DescriptionAn Input Iterator is an iterator that may be dereferenced to refer to some object, and that may be incremented to obtain the next iterator in a sequence. Input Iterators are not required to be mutable.Refinement ofTrivial iterator.Associated types
Notation
DefinitionsAn iterator is pasttheend if it points beyond the last element of a container. Pasttheend values are nonsingular and nondereferenceable.An iterator is valid if it is dereferenceable or pasttheend. An iterator i is incrementable if there is a "next" iterator, that is, if ++i is welldefined. Pasttheend iterators are not incrementable. An Input Iterator j is reachable from an Input Iterator i if, after applying operator++ to i a finite number of times, i == j. [1] The notation [i,j) refers to a range of iterators beginning with i and up to but not including j. The range [i,j) is a valid range if both i and j are valid iterators, and j is reachable from i [2]. Valid expressionsIn addition to the expressions defined in Trivial Iterator, the following expressions must be valid.
Expression semantics
Complexity guaranteesAll operations are amortized constant time.InvariantsModelsNotes[1] i == j does not imply ++i == ++j. [2] Every iterator in a valid range [i, j) is dereferenceable, and j is either dereferenceable or pasttheend. The fact that every iterator in the range is dereferenceable follows from the fact that incrementable iterators must be deferenceable. [3] After executing ++i, it is not required that copies of the old value of i be dereferenceable or that they be in the domain of operator==. [4] It is not guaranteed that it is possible to pass through the same input iterator twice. See alsoOutput Iterator, Iterator overviewCopyright © 1999 Silicon Graphics, Inc. All Rights Reserved. TrademarkInformation
