file
popcount.hContains the definitions of muu::
Namespaces
- namespace muu
- The root namespace for all muu functions and types.
Functions
-
template <typename T>auto has_single_bit(T val) -> bool constexpr noexcept
- Checks if an integral value has only a single bit set.
-
template <typename T>auto popcount(T val) -> int constexpr noexcept
- Counts the number of set bits (the 'population count') of an unsigned integer.