BloombergLP::bslalg::ArrayPrimitives::insert

insert overloads

Synopses

Declared in <bslalg_arrayprimitives.h>

Insert a movable value, shifting subsequent elements.

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);
» more...

Insert a movable value, shifting subsequent elements.

template<class TARGET_TYPE>
static
void
insert(
    TARGET_TYPE* toBegin,
    TARGET_TYPE* toEnd,
    bslmf::MovableRef<TARGET_TYPE> value,
    bslma::Allocator* allocator);
» more...

Insert copies of a value, shifting subsequent elements.

template<class ALLOCATOR>
static
void
insert(
    bsl::allocator_traits<ALLOCATOR>::pointer toBegin,
    bsl::allocator_traits<ALLOCATOR>::pointer toEnd,
    bsl::allocator_traits<ALLOCATOR>::value_type const& value,
    size_type numElements,
    ALLOCATOR allocator);
» more...

Insert copies of a value, shifting subsequent elements.

template<class TARGET_TYPE>
static
void
insert(
    TARGET_TYPE* toBegin,
    TARGET_TYPE* toEnd,
    TARGET_TYPE const& value,
    size_type numElements,
    bslma::Allocator* allocator);
» more...

Same as the preceding insert overload, taking pointer iterators.

template<
    class ALLOCATOR,
    class SOURCE_TYPE>
static
void
insert(
    bsl::allocator_traits<ALLOCATOR>::pointer toBegin,
    bsl::allocator_traits<ALLOCATOR>::pointer toEnd,
    SOURCE_TYPE* fromBegin,
    SOURCE_TYPE* fromEnd,
    size_type numElements,
    ALLOCATOR allocator);
» more...

Same as the preceding overload, taking pointer iterators.

template<
    class TARGET_TYPE,
    class SOURCE_TYPE>
static
void
insert(
    TARGET_TYPE* toBegin,
    TARGET_TYPE* toEnd,
    SOURCE_TYPE* fromBegin,
    SOURCE_TYPE* fromEnd,
    size_type numElements,
    bslma::Allocator* allocator);
» more...

Insert a source range, shifting subsequent elements.

template<
    class ALLOCATOR,
    class FWD_ITER,
    class SENTINEL>
static
void
insert(
    bsl::allocator_traits<ALLOCATOR>::pointer toBegin,
    bsl::allocator_traits<ALLOCATOR>::pointer toEnd,
    FWD_ITER fromBegin,
    SENTINEL fromEnd,
    size_type numElements,
    ALLOCATOR allocator);
» more...

Insert a source range, shifting subsequent elements.

template<
    class TARGET_TYPE,
    class FWD_ITER,
    class SENTINEL>
static
void
insert(
    TARGET_TYPE* toBegin,
    TARGET_TYPE* toEnd,
    FWD_ITER fromBegin,
    SENTINEL fromEnd,
    size_type numElements,
    bslma::Allocator* allocator);
» more...

Parameters

NameDescription
toBegininsertion position within the destination array
toEndend of the populated destination range
valuemovable value to insert
allocatorallocator used to supply memory if required
numElementsnumber of copies of value to insert
fromBeginbeginning of the source range to insert
fromEndend of the source range to insert