C++ concepts: BidirectionalIterator - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# C++ concepts: BidirectionalIterator

From cppreference.com
< cpp‎ | concept

A `BidirectionalIterator` is a `ForwardIterator` that can be moved in both directions (i.e. incremented and decremented).

### [edit] Requirements

- `ForwardIterator`

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; return temp; |
*i-- | reference |  |

A `mutable BidirectionalIterator` is a `BidirectionalIterator` that additionally satisfies the `OutputIterator` requirements.

### [edit] See also

- Iterator library

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/concept/BidirectionalIterator&oldid=70269"