bsl::list::list

Create a list of numElements default-constructed elements.

Synopsis

Declared in <bslstl_list.h>

explicit
list(size_type numElements);

Description

A default-constructed object of the (template parameter) type ALLOCATOR is used. If the type ALLOCATOR is bsl::allocator, the currently installed default allocator is used. 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