carb::cpp20::popcount

Defined in carb/cpp20/Bit.h

template<class T, std::enable_if_t<std::is_unsigned<T>::value, bool> = true>
int carb::cpp20::popcount(T val)

Returns the number of 1 bits in the value of x.

Parameters

val[in] The unsigned integer value to test.

Returns

The number of 1 bits in the value of val.