Namespaces
Variants
Views
Actions

C++ concepts: ForwardIterator

From cppreference.com

A ForwardIterator is an Iterator that can read data from the pointed-to element.

Unlike an InputIterator, it guarantees validity when used in multipass algorithms.

[edit] Requirements

In addition to the above requirements, for a type It to be an Forwardterator, an instance i of It must:

Expression Return Equivalent expression Notes
++i const It& After this, copies of i are still valid
i++ value_type temp = *i;

++i;

return temp;
*i++ reference