stdbitset(3)
std::bitset - std::bitset
Synopsis
Defined in header <bitset>
template< std::size_t N >
class bitset;The class template bitset represents a fixed-size sequence of N bits. Bitsets can be manipulated by standard logic operators and converted to and from strings and integers. bitset meets the requirements of CopyConstructible and CopyAssignable.
Template parameters
N - the number of bits to allocate storage for
Member types
Member functions
Element access
all any checks if all, any or none of the bits are set to true none (public member function)
(C++11)
Capacity
Modifiers
operator&= performs binary AND, OR, XOR and NOT operator|= (public member function) operator^= operator~
operator<<= performs binary shift left and shift right
operator>>= (public member function)
operator<<
operator>>
Conversions
to_ullong returns an unsigned long long integer representation of the data
Non-member functions
operator& performs binary logic operations on bitsets
operator| (function template)
operator^
Helper classes
std::hash<std::bitset> hash support for std::bitset
Notes
If the size of the bitset is not known at compile time, std::vector<bool> or boost::dynamic_bitset may be used.