insert overloads
Declared in <bslstl_vector.h>
Insert at the specified position in this vector the specified move-insertable value, and return an iterator referring to the newly inserted element. value is left in a valid but unspecified state. If an exception is thrown (other than by the copy constructor, move constructor, assignment operator, or move assignment operator of VALUE_TYPE), this is unaffected. Throw std::length_error if size() == max_size(). The behavior is undefined unless position is an iterator in the range [begin() .. end()] (both endpoints included). This method requires that the (template parameter) type VALUE_TYPE be move-insertable into this vector (see {Requirements on VALUE_TYPE}).
iterator
insert(
const_iterator position,
BloombergLP::bslmf::MovableRef<unsigned int> value);
» more...
Insert at the specified position in this vector each VALUE_TYPE object in the specified values initializer list, and return an iterator referring to the first newly inserted element. If an exception is thrown (other than by the copy constructor, move constructor, assignment operator, and move assignment operator of VALUE_TYPE), *this is unaffected. Throw std::length_error if size() + values.size() > max_size(). The behavior is undefined unless position is an iterator in the range [begin() .. end()] (both endpoints included). This method requires that the (template parameter) type VALUE_TYPE be copy-insertable into this vector (see {Requirements on VALUE_TYPE}).
iterator
insert(
const_iterator position,
std::initializer_list<unsigned int> values);
» more...
Insert at the specified position in this vector a copy of the specified value, and return an iterator referring to the newly inserted element. If an exception is thrown (other than by the copy constructor, move constructor, assignment operator, or move assignment operator of VALUE_TYPE), *this is unaffected. Throw std::length_error if size() == max_size(). The behavior is undefined unless position is an iterator in the range [begin() .. end()] (both endpoints included). This method requires that the (template parameter) type VALUE_TYPE be copy-insertable into this vector (see {Requirements on VALUE_TYPE}).
iterator
insert(
const_iterator position,
unsigned int const& value);
» more...
Insert at the specified position in this vector the specified numElements copies of the specified value, and return an iterator referring to the first newly inserted element. If an exception is thrown (other than by the copy constructor, move constructor, assignment operator, or move assignment operator of VALUE_TYPE), *this is unaffected. Throw std::length_error if size() + numElements > max_size(). The behavior is undefined unless position is an iterator in the range [begin() .. end()] (both endpoints included). This method requires that the (template parameter) type VALUE_TYPE be copy-insertable into this vector (see {Requirements on VALUE_TYPE}).
iterator
insert(
const_iterator position,
size_type numElements,
unsigned int const& value);
» more...
Insert at the specified position in this vector the values in the range starting at the specified first element, and ending immediately before the specified last element. Return an iterator referring to the first newly inserted element. If an exception is thrown (other than by the copy constructor, move constructor, assignment operator, or move assignment operator of value_type), *this is unaffected. Throw std::length_error if size() + distance(first, last) > 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 position is an iterator in the range [begin() .. end()] (both endpoints included), and first and last refer to a range of valid values where first is at a position at or before last.
template<class INPUT_ITER>
iterator
insert(
const_iterator position,
INPUT_ITER first,
INPUT_ITER last);
» more...