Constructors
Declared in <bslstl_vector.h>
Create an empty vector.
vector() noexcept;
» more...
Create a vector having the same value as the specified original object by moving (in constant time) the contents of original to the new vector. The allocator associated with original is propagated for use in the newly-created vector. original is left in a valid but unspecified state.
vector(BloombergLP::bslmf::MovableRef<vector<long long>> original) noexcept;
» more...
Create an empty vector. Optionally specify a basicAllocator used to supply memory. If basicAllocator is not specified, a default-constructed object of the (template parameter) type ALLOCATOR is used. If the type ALLOCATOR is bsl::allocator and basicAllocator is not supplied, the currently installed default allocator is used. Note that a bslma::Allocator * can be supplied for basicAllocator if the type ALLOCATOR is bsl::allocator (the default).
explicit
vector(allocator<long long> const& basicAllocator) noexcept;
» more...
Create a vector having the same value as the specified original object. Use the allocator returned by 'bsl::allocator_traits<ALLOCATOR>:: select_on_container_copy_construction(original.get_allocator())' to allocate memory. This method requires that the (template parameter) type VALUE_TYPE be copy-insertable into this vector (see {Requirements on VALUE_TYPE}).
vector(vector<long long> const& original);
» more...
Create a vector of the specified initialSize whose every element is a default-constructed object of the (template parameter) type VALUE_TYPE. Optionally specify a basicAllocator used to supply memory. If basicAllocator is not specified, a default-constructed object of the (template parameter) type ALLOCATOR is used. If the type ALLOCATOR is bsl::allocator and basicAllocator is not supplied, the currently installed default allocator is used. Throw std::length_error if initialSize > max_size(). This method requires that the type VALUE_TYPE be default-insertable into this vector (see {Requirements on VALUE_TYPE}). Note that a bslma::Allocator * can be supplied for basicAllocator if the type ALLOCATOR is bsl::allocator (the default).
explicit
vector(
size_type initialSize,
allocator<long long> const& basicAllocator = ALLOCATOR());
» more...
Create a vector having the same value as the specified original object that uses the specified basicAllocator to supply memory. The contents of original are moved (in constant time) to the new vector if basicAllocator == original.get_allocator(), and are move-inserted (in linear time) using basicAllocator otherwise. original is left in a valid but unspecified state. This method requires that the (template parameter) type VALUE_TYPE be move-insertable into this vector (see {Requirements on VALUE_TYPE}). Note that a bslma::Allocator * can be supplied for basicAllocator if the (template parameter) type ALLOCATOR is bsl::allocator (the default).
vector(
BloombergLP::bslmf::MovableRef<vector<long long>> original,
type_identity<allocator<long long>>::type const& basicAllocator);
» more...
Create a vector and insert (in order) each VALUE_TYPE object in the specified values initializer list. Optionally specify a basicAllocator used to supply memory. If basicAllocator is not specified, a default-constructed object of the (template parameter) type ALLOCATOR is used. If the type ALLOCATOR is bsl::allocator and basicAllocator is not supplied, the currently installed default allocator is used. This method requires that the (template parameter) type VALUE_TYPE be copy-insertable into this vector (see {Requirements on VALUE_TYPE}). Note that a bslma::Allocator * can be supplied for basicAllocator if the type ALLOCATOR is bsl::allocator (the default).
vector(
std::initializer_list<long long> values,
allocator<long long> const& basicAllocator = ALLOCATOR());
» more...
Create a vector having the same value as the specified original object that uses the specified basicAllocator to supply memory. This method requires that the (template parameter) type VALUE_TYPE be copy-insertable into this vector (see {Requirements on VALUE_TYPE}). Note that a bslma::Allocator * can be supplied for basicAllocator if the (template parameter) type ALLOCATOR is bsl::allocator (the default).
vector(
vector<long long> const& original,
type_identity<allocator<long long>>::type const& basicAllocator);
» more...
Create a vector of the specified initialSize whose every element is a copy of the specified value. Optionally specify a basicAllocator used to supply memory. If basicAllocator is not specified, a default-constructed object of the (template parameter) type ALLOCATOR is used. If the type ALLOCATOR is bsl::allocator and basicAllocator is not supplied, the currently installed default allocator is used. Throw std::length_error if initialSize > max_size(). This method requires that the (template parameter) type VALUE_TYPE be copy-insertable into this vector (see {Requirements on VALUE_TYPE}). Note that a bslma::Allocator * can be supplied for basicAllocator if the type ALLOCATOR is bsl::allocator (the default).
vector(
size_type initialSize,
long long const& value,
allocator<long long> const& basicAllocator = ALLOCATOR());
» more...
Create a vector, and insert (in order) each VALUE_TYPE object in the range starting at the specified first element, and ending immediately before the specified last element. Optionally specify a basicAllocator used to supply memory. If basicAllocator is not specified, a default-constructed object of the (template parameter) type ALLOCATOR is used. If the type ALLOCATOR is bsl::allocator and basicAllocator is not supplied, the currently installed default allocator is used. Throw std::length_error if the number of elements in [first .. last)] exceeds the value returned by the method max_size. The (template parameter) type INPUT_ITER shall meet the requirements of an input iterator defined in the C++11 standard [24.2.3]providing access to values of a type convertible to value_type, and value_type must be emplace-constructible from *i into this vector, where i is a dereferenceable iterator in the range [first .. last)] (see {Requirements on VALUE_TYPE}). The behavior is undefined unless first and last refer to a range of valid values where first is at a position at or before last. Note that a bslma::Allocator * can be supplied for basicAllocator if the type ALLOCATOR is bsl::allocator (the default).
template<class INPUT_ITER>
vector(
INPUT_ITER first,
INPUT_ITER last,
allocator<long long> const& basicAllocator = ALLOCATOR());
» more...
Create a vector from the elements of the specifed range. Optionally specify a basicAllocator used to supply memory. If basicAllocator is not specified, a default-constructed object of the (template parameter) type ALLOCATOR is used. Note that range must meet the requirements of an input range and the values from range must have a type matching or convertible to (template parameter) VALUE_TYPE.
template<class t_RANGE>
vector(
std::from_range_t,
t_RANGE&& range,
allocator<long long> const& basicAllocator = ALLOCATOR());
» more...