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

PrevUpHomeNext

back_extended_deque

Description

back_extended_deque allows a deque to be back extended. It shares the same properties as the deque.

Header
See deque
Synopsis
template <typename Deque, typename T>
struct back_extended_deque;
Template parameters

Parameter

Description

Default

Deque

Deque type

T

Element type

[Note] Note

Deque can be a deque, a back_extended_deque or a back_extended_deque

Model of

Notation

D

A back_extended_deque type

e

Heterogeneous value

N

An MPL Integral Constant

Expression Semantics

Semantics of an expression is defined only where it differs from, or is not defined in Bidirectional Sequence.

Expression

Semantics

D(d, e)

Extend d prepending e to its back.

at<N>(d)

The Nth element from the beginning of the sequence; see at.

[Note] Note

See deque for further details.

Example
typedef deque<int, float> initial_deque;
initial_deque d(12, 5.5f);
back_extended_deque<initial_deque, int> d2(d, 999);
std::cout << at_c<0>(d2) << std::endl;
std::cout << at_c<1>(d2) << std::endl;
std::cout << at_c<2>(d2) << std::endl;

PrevUpHomeNext