ForwardIterator
DescriptionA Forward Iterator is an iterator that corresponds to the usual intuitive notion of a linear sequence of values. It is possible to use Forward Iterators (unlike InputIterator and OutputIterator) in multipass algorithms. Forward Iterators do not, however, allow stepping backwards through a sequence, but only, as the name suggests, forward. A type that is a model of Forward Iterator may be either mutable or immutable, as defined in the trivial requirements. Refinement ofAssociated typesThe same as for InputIterator Notation
DefinitionsValid expressionsForward Iterator does not define any new expressions beyond those defined in InputIterator. However, some of the restrictions described in InputIterator are relaxed.
Expression semanticsForward Iterator does not define any new expressions beyond those defined in InputIterator. However, some of the restrictions described in InputIterator are relaxed.
Complexity guaranteesThe complexity of operations on Forward Iterators is guaranteed to be amortized constant time. InvariantsModels
Notes[1] The restrictions described in InputIterator have been removed. Incrementing a forward iterator does not invalidate copies of the old value and it is guaranteed that, if See alsoInputIterator, OutputIterator, BidirectionalIterator, RandomAccessIterator, Iterators |