Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.

[Home]Bidirectional Iterator

Description

A Bidirectional Iterator is a Forward Iterator that provides a way to obtain the previous element in a sequence.

Refinement of

Forward Iterator

Definitions

Valid expressions

Bidirectional Iterator both defines a new expression and refines the one described in Forward Iterator.

 Expression  Expression type  
typename i::nextA model of Bidirectional Iterator
typename i::priorA model of Bidirectional Iterator

Expression semantics

Semantics of an expression is defined only where it is not defined in Forward Iterator.

 Expression  Complexity  Precondition  Semantics  Postcondition  
typename i::priorAmortized constant timei is decrementablei::prior is an iterator pointing to the previous element of the sequencei::prior is dereferencable and incrementable

Invariants

For any bidirectional iterators i and j the following invariants always hold:

See also

Bidirectional Sequence, Forward Iterator, Random Access Iterator


Table of Contents
Last edited July 15, 2002 11:33 am