BloombergLP::bslalg::ArrayPrimitives::emplace

Emplace a newly constructed element, shifting subsequent elements.

Synopses

Declared in <bslalg_arrayprimitives.h>

Emplace a newly constructed element, shifting subsequent elements.

template<
    class ALLOCATOR,
    class... ARGS>
static
void
emplace(
    bsl::allocator_traits<ALLOCATOR>::pointer toBegin,
    bsl::allocator_traits<ALLOCATOR>::pointer toEnd,
    ALLOCATOR allocator,
    ARGS&&... arguments);
» more...

Emplace a newly constructed element, shifting subsequent elements.

template<
    class TARGET_TYPE,
    class... ARGS>
static
void
emplace(
    TARGET_TYPE* toBegin,
    TARGET_TYPE* toEnd,
    bslma::Allocator* allocator,
    ARGS&&... args);
» more...

Parameters

NameDescription
toBegininsertion position within the destination array
toEndend of the populated destination range
allocatorallocator used to supply memory if required
argumentsconstructor arguments forwarded to the new element
argsconstructor arguments forwarded to the new element