23 Containers library [containers]

23.3 Sequence containers [sequences]

23.3.3 Class template deque [deque]

23.3.3.2 deque constructors, copy, and assignment [deque.cons]

explicit deque(const Allocator& = Allocator());

Effects: Constructs an empty deque, using the specified allocator.

Complexity: Constant.

explicit deque(size_type n);

Effects: Constructs a deque with n value-initialized elements.

Requires: T shall be DefaultConstructible.

Complexity: Linear in n.

deque(size_type n, const T& value, const Allocator& = Allocator());

Effects: Constructs a deque with n copies of value, using the specified allocator.

Requires: T shall be CopyInsertable into *this.

Complexity: Linear in n.

template <class InputIterator> deque(InputIterator first, InputIterator last, const Allocator& = Allocator());

Effects: Constructs a deque equal to the range [first,last), using the specified allocator.

Complexity: distance(first, last).

template <class InputIterator> void assign(InputIterator first, InputIterator last);

Effects:

erase(begin(), end());
insert(begin(), first, last);

void assign(size_type n, const T& t);

Effects:

erase(begin(), end());
insert(begin(), n, t);