std::bitset::count

From Cppreference

Jump to: navigation, search
size_t count() const;

Returns the number of bits that are set to true.

[edit] Parameters

(none)

[edit] Return value

number of bits that are set to true.

[edit] See also

size
returns the size number of bits that the bitset can hold
(public member function)