Namespaces
Variants
Views
Actions

std::deque

From cppreference.com
< cpp‎ | container
Revision as of 01:28, 29 April 2011 by WikiSysop (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:cpp/container/deque/sidebar

Defined in header <deque>
template<

    class T,
    class Allocator = std::allocator<T>

> class deque;

Double-ended queues (or deques) are similar to vectors, except that they allow fast insertions and deletions at both the beginning and the end of the container.

Deques are commonly implemented as dynamically allocated arrays that can grow at both ends. This guarantees constant time access, amortized constant time insertion and deletion at either end of the deque, and linear time insertion and deletion from the middle of the deque.

Template:tdcl list begin Template:tdcl list h1 Template:tdcl list hitem Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list end

Template:cpp/container/dcl list constructorTemplate:cpp/container/dcl list destructorTemplate:cpp/container/dcl list operator=Template:cpp/container/dcl list assignTemplate:cpp/container/dcl list get allocatorTemplate:cpp/container/dcl list atTemplate:cpp/container/dcl list operator atTemplate:cpp/container/dcl list frontTemplate:cpp/container/dcl list backTemplate:cpp/container/dcl list beginTemplate:cpp/container/dcl list endTemplate:cpp/container/dcl list rbeginTemplate:cpp/container/dcl list rendTemplate:cpp/container/dcl list emptyTemplate:cpp/container/dcl list sizeTemplate:cpp/container/dcl list max sizeTemplate:cpp/container/dcl list shrink to fitTemplate:cpp/container/dcl list clearTemplate:cpp/container/dcl list insertTemplate:cpp/container/dcl list emplaceTemplate:cpp/container/dcl list eraseTemplate:cpp/container/dcl list push backTemplate:cpp/container/dcl list emplace backTemplate:cpp/container/dcl list pop backTemplate:cpp/container/dcl list push frontTemplate:cpp/container/dcl list emplace frontTemplate:cpp/container/dcl list pop frontTemplate:cpp/container/dcl list resizeTemplate:cpp/container/dcl list swap

Contents

Member functions

Element access
Iterators
Capacity
Modifiers