BloombergLP::bdlc::PackedIntArray::insert

Insert numElements from srcArray at dstIndex.

Synopsis

Declared in <bdlc_packedintarray.h>

void
insert(
    std::size_t dstIndex,
    PackedIntArray const& srcArray,
    std::size_t srcIndex,
    std::size_t numElements);

Description

Insert into this array, at the specified dstIndex, the specified numElements values in the specified srcArray starting at the specified srcIndex. Elements greater than or equal to dstIndex are shifted up numElements positions. The behavior is undefined unless dstIndex <= length() and srcIndex + numElements <= srcArray.length(). Note that if this array and srcArray are the same, the behavior is as if a copy of srcArray were passed.

Parameters

NameDescription
dstIndexindex at which to insert
srcArraysource array to insert from
srcIndexfirst index in srcArray to insert
numElementsnumber of elements to insert