Forward Iterator

Category: iterators

Component type: concept

Description

A 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 Input Iterators and Output Iterators)
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 Iterators
requirements.

Complexity guarantees

Invariants

Models

Notes

[1]
The restrictions described in Input Iterator have been
removed. Incrementing a forward iterator does not invalidate copies
of the old value and it is guaranteed that, if i and j are
dereferenceable and i == j, then ++i == ++j. As a consequence
of these two facts, it is possible to pass through the same
Forward Iterator twice.