bsl::list::list

Constructors

Synopses

Declared in <bslstl_list.h>

Create an empty list.

list();
» more...

Create a list having the same value as the specified original.

list(list const& original);
» more...

Create a list of numElements default-constructed elements.

explicit
list(size_type numElements);
» more...

Create a list by moving the contents of the specified original.

list(BloombergLP::bslmf::MovableRef<list> original);
» more...

Create an empty list that uses the specified basicAllocator.

explicit
list(ALLOCATOR const& basicAllocator);
» more...

Create a list of numElements default-constructed elements.

list(
    size_type numElements,
    ALLOCATOR const& basicAllocator);
» more...

Create a list by moving from original, using basicAllocator.

list(
    BloombergLP::bslmf::MovableRef<list> original,
    ALLOCATOR const& basicAllocator);
» more...

Create a list from the specified values initializer list.

list(
    std::initializer_list<value_type> values,
    ALLOCATOR const& basicAllocator = ALLOCATOR());
» more...

Create a list with the same value as original, using basicAllocator.

list(
    list const& original,
    ALLOCATOR const& basicAllocator);
» more...

Create a list of numElements copies of value.

list(
    size_type numElements,
    value_type const& value,
    ALLOCATOR const& basicAllocator = ALLOCATOR());
» more...

Create a list containing copies of the values in [first .. last)].

template<class INPUT_ITERATOR>
list(
    INPUT_ITERATOR first,
    INPUT_ITERATOR last,
    ALLOCATOR const& basicAllocator = ALLOCATOR())
requires !is_arithmetic<INPUT_ITERATOR>::value &&
                 !is_enum<INPUT_ITERATOR>::value;
» more...

Create a list from the elements of the specified range.

template<class t_RANGE>
list(
    std::from_range_t tag,
    t_RANGE&& range,
    ALLOCATOR const& basicAllocator = ALLOCATOR());
» more...

Parameters

NameDescription
originallist whose value is copied
numElementsnumber of default-constructed elements
basicAllocatorallocator used to supply memory
valuesinitializer list of values to append
valuevalue copied into each element
firststart of the iterator range
lastone past the end of the iterator range
tagdisambiguation tag for the range constructor
rangerange of values to insert