deque

C++ Library  
 
 

Header

<deque>

Deque provides a sequence that can be efficiently expanded in both directions: it allows constant time insertion and deletion of objects at either end. Like vector, deque allows fast random access to any element.

Deques are specially optimized for insertion of single elements at either the beginning or the end of the data structure. Such insertions always take constant time.

Inserting elements in the middle of the sequence is an expensive operation since it requires element copies and assignments proportional to the number of elements in the sequence.


Class Members

Constructor

deque Constructs a deque in various ways

Member Functions

assign at back begin clear
empty end erase front get_allocator
insert max_size operator[] pop_back pop_front
push_back push_front rbegin rend resize
size swap

Template Functions

operator!= operator== operator<
operator<= operator> operator>=
swap


© 1997 Microsoft Corporation. All rights reserved. Terms of Use.