Constructors
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...
| Name | Description |
|---|---|
| original | vector whose value to copy |
| basicAllocator | allocator used to supply memory |
| initialSize | number of elements to create |
| values | initializer list of elements |
| value | value copied into each element |
| first | the start of the iterator range |
| last | one past the end of the iterator range |
| unused | tag selecting the from-range constructor overload |
| range | input range of elements |