muu/countl.h file

Contains the definitions of muu::countl_zero() and muu::countl_one().

Namespaces

namespace muu
The root namespace for all muu functions and types.

Functions

template <typename T>
auto countl_one(T val) -> int constexpr noexcept
Counts the number of consecutive 1 bits, starting from the left.
template <typename T>
auto countl_zero(T val) -> int constexpr noexcept
Counts the number of consecutive 0 bits, starting from the left.