Set a range of bits in this array to the specified value.

Synopsis

Declared in <bdlc_bitarray.h>

void
assign(
    std::size_t index,
    bool value,
    std::size_t numBits);

Description

Set the value of the specified numBits bits starting at the specified index in this array to the specified value. The behavior is undefined unless index + numBits < length().

Parameters

Name

Description

index

starting bit position to set

value

bit value to store in the range

numBits

number of bits to set

Created with MrDocs