Standard C++ Library Class Reference

Replaces each bit at position I with 0 if I < pos or with the value of the bit at I - pos if I >= pos. Returns *this.
bitset<N>&
operator>>= (size_t pos);
Replaces each bit at position I with 0 if pos >= N-I or with the value of the bit at position I + pos if pos < N-I. Returns
*this.
bitset<N>&
operator>> (size_t pos) const;
Returns bitset<N>(*this) >>= pos.
bitset<N>&
operator<< (size_t pos) const;
Returns bitset<N>(*this) <<= pos.
bitset<N>
operator~ () const;
Returns the bitset that is the logical complement of each bit in *this.
bitset<N>
operator& (const bitset<N>& lhs,
const bitset<N>& rhs);
lhs gets logical AND of lhs with rhs.
bitset<N>
operator| (const bitset<N>& lhs,
const bitset<N>& rhs);
lhs gets logical OR of lhs with rhs.
bitset<N>
operator^ (const bitset<N>& lhs,
const bitset<N>& rhs);
lhs gets logical XOR of lhs with rhs.
template <size_t N>
istream&
operator>> (istream& is, bitset<N>& x);
Extracts up to N characters (single-byte) from is. Stores these characters in a temporary object str of type string, then
evaluates the expression x = bitset<N>(str). Characters are extracted and stored until any of the following occurs:
N characters have been extracted and stored
An end-of-file occurs on the input sequence
The next character is neither '0' nor '1'. In this case, the character is not extracted.
Returns is.
template <size_t N>
ostream&
operator<< (ostream& os, const bitset<N>& x);
Returns os << x.to_string()
Member Functions
bool
any () const;
Returns true if any bit in *this is set. Otherwise returns false.
size_t