bsl::list::list

Create a list of numElements default-constructed elements.

Synopsis

Declared in <bslstl_list.h>

list(
    size_type numElements,
    ALLOCATOR const& basicAllocator);

Description

Use the specified basicAllocator to supply memory. If the type ALLOCATOR is bsl::allocator (the default), then basicAllocator shall be convertible to bslma::Allocator *. Throw bsl::length_error if numElements > max_size(). This method requires that the (template parameter) VALUE be default-insertable into this list (see {Requirements on VALUE}).

Parameters

NameDescription
numElementsnumber of default-constructed elements
basicAllocatorallocator used to supply memory