Function find_first

Synopsis

#include <include/EASTL/bitset.h>

size_type find_first() const

Description

Finds the index of the first "on" bit, returns kSize if none are set.

Source

Lines 2144-2155 in include/EASTL/bitset.h. Line 419 in include/EASTL/bitset.h.

template <size_t N, typename WordType>
inline typename bitset<N, WordType>::size_type
bitset<N, WordType>::find_first() const
{
    const size_type i = base_type::DoFindFirst();
    if(i < kSize)
        return i;
    // Else i could be the base type bit count, so we clamp it to our size.
    return kSize;
}





Add Discussion as Guest

Log in