folly::std_bitset_find_first

Return the index of the first set bit in a bitset, or bitset.size() if none.

Synopsis

Declared in <folly/container/StdBitset.h>

template<size_t N>
size_t
std_bitset_find_first(std::bitset<N> const& bitset) noexcept;

NOTE

This function is defined as an Algorithm Function Object (AFO).

Return Value

The index of the first set bit, or bitset.size() if none.

Parameters

NameDescription
bitsetThe bitset to search.