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

Click here to view the latest version of this page.
Front Page / Sequences / Concepts / Bidirectional Sequence

Bidirectional Sequence

Description

A Bidirectional Sequence is a Forward Sequence whose iterators model Bidirectional Iterator.

Refinement of

Forward Sequence

Expression requirements

In addition to the requirements defined in Forward Sequence, for any Bidirectional Sequence s the following must be met:

Expression Type Complexity
begin<s>::type Bidirectional Iterator Amortized constant time
end<s>::type Bidirectional Iterator Amortized constant time
back<s>::type Any type Amortized constant time

Expression semantics

The semantics of an expression are defined only where they differ from, or are not defined in Forward Sequence.

Expression Semantics
back<s>::type The last element in the sequence; see back.

Models

See also

Sequences, Forward Sequence, Random Access Sequence, Bidirectional Iterator, begin / end, back