Insert a copy of value before position.
Declared in <bslstl_deque.h>
deque<VALUE_TYPE, ALLOCATOR>::iterator
insert(
const_iterator position,
VALUE_TYPE const& value);
Insert at the specified position in this deque a copy of the specified value, and return an iterator providing modifiable access to the newly inserted element. This method offers full guarantee of rollback in case an exception is thrown other than by the VALUE_TYPE copy constructor or assignment operator. This method requires that the (template parameter) VALUE_TYPE be copy-insertable into this deque (see {Requirements on VALUE_TYPE}). The behavior is undefined unless position is an iterator in the range [cbegin() .. cend()] (both endpoints included).
iterator to the newly inserted element
| Name | Description |
|---|---|
| position | iterator before which to insert |
| value | value to copy-insert |