Function population_count

Synopsis

#include "breeze/mathematics/population_count.hpp"

template <typename T>
constexpr int population_count(T t) noexcept

Description

Returns the number of on bits in the binary representation of the value of t.

T must be an unsigned integral type.

Warning
[FUTURE] This function template will be removed in favor of std::popcount() when Breeze will require C++20.

Mentioned in

Source

Line 34 in breeze/mathematics/population_count.hpp.