Standard C++ Library Class Reference

Interface
template <size_t N>
class bitset {
public:
// bit reference:
class reference {
friend class bitset<N>;
public:
~reference();
reference& operator= (bool);
reference& operator= (const reference&);
bool operator~() const;
operator bool() const;
reference& flip();
};
// Constructors bitset ();
bitset (unsigned long);
explicit bitset (const string&, size_t = 0,
size_t = (size_t)-1);
bitset (const bitset<N>&);
bitset<N>& operator= (const bitset<N>&);
// Bitwise Operators and Bitwise Operator Assignment bitset<N>& operator&= (const
bitset<N>&);
bitset<N>& operator|= (const bitset<N>&);
bitset<N>& operator^= (const bitset<N>&);
bitset<N>& operator<<= (size_t);
bitset<N>& operator>>= (size_t);
// Set, Reset, Flip bitset<N>& set ();
bitset<N>& set (size_t, int = 1);
bitset<N>& reset ();
bitset<N>& reset (size_t);
bitset<N> operator~() const;
bitset<N>& flip ();
bitset<N>& flip (size_t);
// element access
reference operator[] (size_t);
unsigned long to_ulong() const;
string to_string() const;
size_t count() const;
size_t size() const;
bool operator== (const bitset<N>&) const;
bool operator!= (const bitset<N>&) const;
bool test (size_t) const;
bool any() const;
bool none() const;
bitset<N> operator<< (size_t) const;
bitset<N> operator>> (size_t) const;
};
// Non-member operators template <size_t N>
bitset<N> operator& (const bitset<N>&, const bitset<N>&);
template <size_t N>
bitset<N> operator| (const bitset<N>&, const bitset<N>&);
template <size_t N>
bitset<N> operator^ (const bitset<N>&, const bitset<N>&);
template <size_t N>
istream& operator>> (istream&, bitset<N>&);