All these operators emulate for the bitset container the bitwise logic which applies to fundamental data types.
Parameters
- lhs
- Left-hand side bitset object (global functions). It must be of the same amount of bits as the right-hand side bitset object (i.e. with the same N template parameter).
- rhs
- Right-hand side bitset object.
For member functions, rhs must have the same amount of bits as the bitset object. - is,os
- istream or ostream object from which a bitset object is respectively extracted or inserted. The format in which bitsets are inserted/extracted is binary (successions of 0's and 1's).
Return value
Member functions: either *this or the result of the comparison.Global functions: The left-hand side object (lhs, is or os).
Example
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
See also
| bitset::operator[] | Access bit (public member function) |
| bitset::set | Set bits (public member function) |
| bitset::reset | Reset bits (public member function) |
| bitset::flip | Flip bits (public member function) |
