Count the number of bits set in an unsigned integer type.

Synopsis

Declared in <util/bitset.h>

template<typename I>
constexpr
unsigned int
PopCount(I v);

Return Value

The number of 1 bits in v.

Parameters

Name

Description

v

The integer whose set bits are counted.

Created with MrDocs