C++ named requirements: LegacyForwardIterator
A LegacyForwardIterator is a LegacyIterator that can read data from the pointed-to element.
If a LegacyForwardIterator
it originates from a Container, then
it's value_type is the same as the container's, so dereferencing (*it) obtains the container's value_type.
It satisfies LegacyForwardIterator if
- The type
- The type
- Objects of the type
Itprovide multipass guarantee described below
- The type
std::iterator_traits<It>::referencemust be exactly
Itsatisfies LegacyOutputIterator (
const T&otherwise (
Tis the type denoted by std::iterator_traits<It>::value_type)
- Equality and inequality comparison is defined over all iterators for the same underlying sequence and the value initialized-iterators (since C++14).
i, dereferenceable iterator of type
reference,the type denoted by
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;|
A mutable LegacyForwardIterator is a LegacyForwardIterator that additionally satisfies the LegacyOutputIterator requirements.
 Multipass guarantee
b, dereferenceable iterators of type
bcompare equal (
a == bis contextually convertible to
true) then either they are both non-dereferenceable or
*bare references bound to the same object
*brefer to the same object, then
- Assignment through a mutable
ForwardIteratoriterator cannot invalidate the iterator (implicit due to
referencedefined as a true reference)
- incrementing a copy of
adoes not change the value read from
Itis a raw pointer type or the expression (void)++It(a), *a is equivalent to the expression *a)
a == bimplies
++a == ++b
Singular iteratorsA value-initialized LegacyForwardIterator behaves like the past-the-end iterator of some unspecified empty container: it compares equal to all value-initialized LegacyForwardIterators of the same type.
For the definition of std::iterator_traits, the following exposition-only concept is defined.
where the exposition-only concept
 See also
| specifies that an |
|Iterator library||provides definitions for iterators, iterator traits, adaptors, and utility functions|