insert overloads
Synopses
Declared in <bslstl_vector.h>
Insert a move‐inserted value before position.
Insert the elements of values before position.
vector<VALUE_TYPE, ALLOCATOR>::iterator
insert(
const_iterator position,
std::initializer_list<VALUE_TYPE> values);
Insert a copy of value at position.
vector<VALUE_TYPE, ALLOCATOR>::iterator
insert(
const_iterator position,
VALUE_TYPE const& value);
Insert elements into this vector.
vector<VALUE_TYPE, ALLOCATOR>::iterator
insert(
const_iterator position,
size_type numElements,
VALUE_TYPE const& value);
Insert the range [first, last)] before position.
template<class INPUT_ITER>
iterator
insert(
const_iterator position,
INPUT_ITER first,
INPUT_ITER last);
Return Value
-
iterator referring to the newly inserted element
-
iterator to the first inserted element, or
positionif empty -
iterator referring to the first newly inserted element, or
positionif none
Parameters
Name |
Description |
position |
iterator before which to insert |
value |
element to move‐insert |
values |
initializer list of values to insert |
numElements |
number of elements to insert or assign |
first |
start of the range to insert |
last |
end of the range to insert |
Created with MrDocs