Insert the specified value into the array of allocator_traits<ALLOCATOR>::value_type objects at the specified toBegin location, shifting forward the elements from toBegin to the specified toEnd location by one position. value is left in a valid but unspecified state. If a (copy or move) constructor or a (copy or move) assignment operator throws an exception, then any elements created after toEnd are destroyed and the elements in the range [toBegin .. toEnd )] are left in a valid but unspecified state. The behavior is undefined unless toBegin refers to sufficient space to hold at least toEnd ‐ toBegin + 1 elements.

Synopsis

Declared in <bslalg_arrayprimitives.h>

template<class ALLOCATOR>
static
void
insert(
    bsl::allocator_traits<ALLOCATOR>::pointer toBegin,
    bsl::allocator_traits<ALLOCATOR>::pointer toEnd,
    bslmf::MovableRef<bsl::allocator_traits<ALLOCATOR>::value_type> value,
    ALLOCATOR allocator);

Created with MrDocs