BloombergLP::bdlc::BitArray::insert

Insert a bit range from srcArray at dstIndex in this array.

Synopsis

Declared in <bdlc_bitarray.h>

void
insert(
    std::size_t dstIndex,
    BitArray const& srcArray,
    std::size_t srcIndex,
    std::size_t numBits);

Description

Insert into this array, beginning at the specified dstIndex, the specified numBits from the specified srcArray beginning at the specified srcIndex. All values with initial indices at or above dstIndex are shifted up by numBits positions. The behavior is undefined unless dstIndex <= length() and srcIndex + numBits <= srcArray.length().

Parameters

NameDescription
dstIndexindex at which to insert
srcArrayarray providing the bits to insert
srcIndexstarting index in srcArray
numBitsnumber of bits to insert