Constructors
Synopses
Declared in <bslstl_list.h>
Create an empty list.
list();
Create a list having the same value as the specified original.
Create a list of numElements default‐constructed elements.
explicit
list(size_type numElements);
Create a list by moving the contents of the specified original.
list(BloombergLP::bslmf::MovableRef<list> original);
Create an empty list that uses the specified basicAllocator.
explicit
list(ALLOCATOR const& basicAllocator);
Create a list of numElements default‐constructed elements.
list(
size_type numElements,
ALLOCATOR const& basicAllocator);
Create a list by moving from original, using basicAllocator.
list(
BloombergLP::bslmf::MovableRef<list> original,
ALLOCATOR const& basicAllocator);
Create a list from the specified values initializer list.
list(
std::initializer_list<value_type> values,
ALLOCATOR const& basicAllocator = ALLOCATOR());
Create a list with the same value as original, using basicAllocator.
Create a list of numElements copies of value.
list(
size_type numElements,
value_type const& value,
ALLOCATOR const& basicAllocator = ALLOCATOR());
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;
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());
Parameters
Name |
Description |
original |
list whose value is copied |
numElements |
number of default‐constructed elements |
basicAllocator |
allocator used to supply memory |
values |
initializer list of values to append |
value |
value copied into each element |
first |
start of the iterator range |
last |
one past the end of the iterator range |
tag |
disambiguation tag for the range constructor |
range |
range of values to insert |
Created with MrDocs