C++ concepts: BidirectionalIterator
From cppreference.com
A BidirectionalIterator
is a ForwardIterator
that can be moved in both directions (i.e. incremented and decremented).
[edit] Requirements
In addition to the above requirement, for a type It
to be an BidirectionalIterator
, an instance i
of It
must:
Expression | Return | Equivalent expression | Notes |
---|---|---|---|
--i | It& | After this, copies of i are still valid
|
|
i-- | convertible to const It& |
It temp = i; --i; |
|
*i-- | reference |
A mutable BidirectionalIterator
is a BidirectionalIterator
that additionally satisfies the OutputIterator
requirements.