cppx-core
Namespaces | Functions
sum_of_bits.hpp File Reference

sum_of_bits, the number of 1-bits in a std::bitset or unsigned value. More...

#include <cppx-core/language/syntax/macro-use.hpp>
#include <cppx-core/language/bit-level/bits_per_.hpp>
#include <bitset>
#include <type_traits>
Include dependency graph for sum_of_bits.hpp:

Go to the source code of this file.

Namespaces

 cppx
 
 cppx::bitlevel
 

Functions

template<int n>
auto cppx::sum_of_bits (const bitset< n > &bits) noexcept -> int
 The number of 1-bits in a std::bitset. More...
 
template<class Unsigned >
auto cppx::sum_of_bits (const uint16_t x) noexcept -> int
 The number of 1-bits in an unsigned value. More...
 
 cppx::bitlevel::CPPX_USE_CPPX (sum_of_bits)
 

Detailed Description

sum_of_bits, the number of 1-bits in a std::bitset or unsigned value.

Definition in file sum_of_bits.hpp.