cppreference.com > C++ Bitsets
C++ Bitsets

C++ Bitsets give the programmer a set of bits as a data structure. Bitsets can be manipulated by various binary operators such as logical AND, OR, and so on.

Display all entries for C++ Bitsets on one page, or view entries individually:

Bitset Constructorscreate new bitsets
Bitset Operatorscompare and assign bitsets
anytrue if any bits are set
countreturns the number of set bits
flipreverses the bitset
nonetrue if no bits are set
resetsets bits to zero
setsets bits
sizenumber of bits that the bitset can hold
testreturns the value of a given bit
to_stringstring representation of the bitset
to_ulongreturns an integer representation of the bitset