bsl::vector::vector

Constructors

Synopses

Declared in <bslstl_vector.h>

Create an empty vector.

vector() noexcept;
» more...

Copy-construct a vector from original.

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

Create a vector by moving from the specified original.

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

Create an empty vector that uses the specified basicAllocator.

explicit
vector(ALLOCATOR const& basicAllocator) noexcept;
» more...

Create a vector of the specified initialSize default-constructed elements.

explicit
vector(
    size_type initialSize,
    ALLOCATOR const& basicAllocator = ALLOCATOR());
» more...

Create a vector having the same value as the specified original object that uses the specified basicAllocator to supply memory.

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

Create a vector and insert (in order) each VALUE_TYPE object in the specified values initializer list.

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

Create a vector having the same value as the specified original object that uses the specified basicAllocator to supply memory.

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

Create a vector of initialSize elements each equal to value.

vector(
    size_type initialSize,
    VALUE_TYPE const& value,
    ALLOCATOR const& basicAllocator = ALLOCATOR());
» more...

Create a vector from the specified iterator range.

template<class INPUT_ITER>
vector(
    INPUT_ITER first,
    INPUT_ITER last,
    ALLOCATOR const& basicAllocator = ALLOCATOR());
» more...

Create a vector from the elements of the specifed range.

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

Parameters

NameDescription
originalvector whose value to copy
basicAllocatorallocator used to supply memory
initialSizenumber of elements to create
valuesinitializer list of elements
valuevalue copied into each element
firstthe start of the iterator range
lastone past the end of the iterator range
unusedtag selecting the from-range constructor overload
rangeinput range of elements