deque Class Members

Reference

Constructors

deque

Constructs a deque of a specific size or with elements of a specific value or with a specific allocator or as a copy of all or part of some other deque.

Typedefs

allocator_type

A type that represents the allocator class for the deque object.

const_iterator

A type that provides a random-access iterator that can access and read a const element in the deque.

const_pointer

A type that provides a pointer to a const element in a deque.

const_reference

A type that provides a reference to a const element stored in a deque for reading and performing const operations.

const_reverse_iterator

A type that provides a random-access iterator that can read any const element in the deque.

difference_type

A type that provides the difference between two iterators that refer to elements within the same deque.

iterator

A type that provides a random-access iterator that can read or modify any element in a deque.

pointer

A type that provides a pointer to an element in a deque.

reference

A type that provides a reference to an element stored in a deque.

reverse_iterator

A type that provides a random-access iterator that can read or modify an element in a reversed deque.

size_type

A type that counts the number of elements in a deque.

value_type

A type that represents the data type stored in a deque.

Member Functions

assign

Erases elements from a deque and copies a new set of elements to the target deque.

at

Returns a reference to the element at a specified location in the deque.

back

Returns a reference to the last element of the deque.

begin

Returns an iterator addressing the first element in the deque.

clear

Erases all the elements of a deque.

empty

Tests if a deque is empty.

end

Returns an iterator that addresses the location succeeding the last element in a deque.

erase

Removes an element or a range of elements in a deque from specified positions.

front

Returns a reference to the first element in a deque.

get_allocator

Returns a copy of the allocator object used to construct the deque.

insert

Inserts an element or a number of elements or a range of elements into the deque at a specified position.

max_size

Returns the maximum length of the deque.

pop_back

Deletes the element at the end of the deque.

pop_front

Deletes the element at the beginning of the deque.

push_back

Adds an element to the end of the deque.

push_front

Adds an element to the beginning of the deque.

rbegin

Returns an iterator to the first element in a reversed deque.

rend

Returns an iterator that points just beyond the last element in a reversed deque.

resize

Specifies a new size for a deque.

size

Returns the number of elements in the deque.

swap

Exchanges the elements of two deques.

Operators

operator[]

Returns a reference to the deque element at a specified position.

See Also

Reference

deque Class

Thread Safety in the Standard C++ Library

Standard Template Library