Create a deque of numElements value-initialized elements.
Declared in <bslstl_deque.h>
explicit
deque(
size_type numElements,
ALLOCATOR const& basicAllocator = ALLOCATOR());
Create a deque of the specified numElements size whose every element is value-initialized. Optionally specify a basicAllocator used to supply memory. If basicAllocator is not supplied, a default-constructed object of the (template parameter) type ALLOCATOR is used. If the type ALLOCATOR is bsl::allocator (the default), then basicAllocator, if supplied, shall be convertible to bslma::Allocator *. If the type ALLOCATOR is bsl::allocator and basicAllocator is not supplied, the currently installed default allocator is used. Throw bsl::length_error if `numElements > max_size()`. This method requires that the (template parameter) VALUE_TYPE be default-insertable into this deque (see {Requirements on VALUE_TYPE}).
| Name | Description |
|---|---|
| numElements | number of elements to create |
| basicAllocator | allocator used to supply memory |