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

Name

Description

numElements

number of default‐constructed elements

basicAllocator

allocator used to supply memory

Created with MrDocs