Parameters
noneReturn value
The number of bits set.size_t is an unsigned integral type.
Example
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Output:
myset has 5 ones, and 3 zeros. |
See also
| bitset::size | Return size (public member function) |
| bitset::any | Test if any bit is set (public member function) |
| bitset::none | Test if no bit is set (public member function) |
