BloombergLP::bdlb::BitStringUtil::isAny1

Return whether any bit in a range of bitString is 1.

Synopsis

Declared in <bdlb_bitstringutil.h>

static
bool
isAny1(
    uint64_t const* bitString,
    std::size_t index,
    std::size_t numBits);

Description

Return true if any of the specified numBits beginning at the specified index in the specified bitString are 1, and false otherwise. The behavior is undefined unless bitString has a length of at least index + numBits.

Return Value

true if any examined bit is 1, and false otherwise

Parameters

NameDescription
bitStringbit string to examine
indexstarting bit position
numBitsnumber of bits to examine