C++ named requirements: LegacyForwardIterator
A LegacyForwardIterator is an LegacyIterator that can read data from the pointedto element.
Unlike LegacyInputIterator and LegacyOutputIterator, it can be used in multipass algorithms.
Requirements
The type It
satisfies LegacyForwardIterator if.
 The type
It
satisfies LegacyInputIterator  The type
It
satisfies DefaultConstructible  Objects of the type
It
providemultipass guaranteedescribed below  The type
std::iterator_traits<It>::reference
must be exactly


T&
ifIt
satisfies LegacyOutputIterator (It
is mutable) 
const T&
otherwise (It
is constant),

 (where
T
is the type denoted bystd::iterator_traits<It>::value_type
)
 Equality and inequality comparison is defined over all iterators for the same underlying sequence and the value initializediterators(since C++14).
And, given.

i
, dereferenceable iterator of typeIt

reference,
the type denoted bystd::iterator_traits<It>::reference
The following expressions must be valid and have their specified effects.
Expression  Return type  Equivalent expression  Notes 

i++  It  It ip=i; ++i; return ip;  
*i++  reference 
AmutableLegacyForwardIterator is a LegacyForwardIterator that additionally satisfies the LegacyOutputIterator requirements.
Multipass guarantee
Given a
and b
, dereferenceable iterators of type It
.
 If
a
andb
compare equal (a == b
is contextually convertible totrue
) then either they are both nondereferenceable or*a
and*b
are references bound to the same object  If
*a
and*b
refer to the same object, thena
==b
.  Assignment through a mutable
ForwardIterator
iterator cannot invalidate the iterator (implicit due toreference
defined as a true reference)  incrementing a copy of
a
does not change the value read froma
(formally, eitherIt
is a raw pointer type or the expression(void)++It(a), *a
is equivalent to the expression*a
) 
a == b
implies++a == ++b
Singular iteratorsA valueinitialized LegacyForwardIterator behaves like the pasttheend iterator of some unspecified empty container: it compares equal to all valueinitialized LegacyForwardIterators of the same type.  (since C++14) 
ConceptFor the definition of
where the expositiononly concept  (since C++20) 
See also
specifies that an InputIterator is a forward iterator, supporting equality comparison and multipass(concept) 
© cppreference.com
Licensed under the Creative Commons AttributionShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/named_req/ForwardIterator