3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/bidirectional-iterator.html
| Prev Next | Back Along | Up Home | Full TOC | Front Page / Iterators / Concepts / Bidirectional Iterator |
A Bidirectional Iterator is a Forward Iterator that provides a way to obtain an iterator to the previous element in a sequence.
In addition to the requirements defined in Forward Iterator, the following requirements must be met.
| Expression | Type | Complexity |
|---|---|---|
| next<i>::type | Bidirectional Iterator | Amortized constant time |
| prior<i>::type | Bidirectional Iterator | Amortized constant time |
| i::category | Integral Constant, convertible to bidirectional_iterator_tag | Constant time |
typedef[prior](./prior.html)<i>::type j;
| Precondition: | i is decrementable | | Semantics: | j is an iterator pointing to the previous element of the sequence | | Postcondition: | j is dereferenceable and incrementable |
For any bidirectional iterators i and j the following invariants always hold:
Iterators, Forward Iterator, Random Access Iterator, Bidirectional Sequence, prior
| Prev Next | Back Along | Up Home | Full TOC |
Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |