BloombergLP::bdlc::BitArray::find1AtMaxIndex

Return the highest index of a 1 bit in the optional range.

Synopsis

Declared in <bdlc_bitarray.h>

std::size_t
find1AtMaxIndex(
    std::size_t begin = 0,
    std::size_t end = k_INVALID_INDEX) const;

Description

Return the index of the most-significant 1 bit in this array in the range optionally specified by begin and end, and k_INVALID_INDEX otherwise. The range is [begin .. effectiveEnd)], where effectiveEnd == length() if end is not specified and effectiveEnd == end otherwise. The behavior is undefined unless begin <= effectiveEnd <= length().

Return Value

highest index of a 1 bit in the range, or k_INVALID_INDEX

Parameters

NameDescription
beginstart of the search range (inclusive)
endend of the search range (exclusive); length if omitted