BloombergLP::bdlb::BitStringUtil::copyRaw

Copy bits between bit strings that do not overlap adversely.

Synopsis

Declared in <bdlb_bitstringutil.h>

static
void
copyRaw(
    uint64_t* dstBitString,
    std::size_t dstIndex,
    uint64_t const* srcBitString,
    std::size_t srcIndex,
    std::size_t numBits);

Description

Copy to the specified dstBitString, beginning at the specified dstIndex, the specified numBits beginning at the specified srcIndex in the specified srcBitString. The behavior is undefined unless dstBitString has a capacity of at least dstIndex + numBits, srcBitString has a length of at least srcIndex + numBits, and the source and destination ranges either do not overlap, or the destination range is equal to the source range, or the start of the destination range is below the start of the source range.

Parameters

NameDescription
dstBitStringdestination bit string
dstIndexstarting bit index in the destination
srcBitStringsource bit string
srcIndexstarting bit index in the source
numBitsnumber of bits to copy