Template:ddcl list begin <tr class="t-dcl "><td >
const bitset<N>& x);
<td > (1) </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl "><td >
<td > (2) </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end
Inserts or extracts a bitset from a character stream.
1) Writes the bitset
x to the character stream
os as if by first converting it to a
basic_string<CharT, Traits> using Template:rlpf, and then writing it into
os using the operator<< (which is a
FormattedOutputFunction for strings). The characters to use for ones and zeroes are obtained from the currently-imbued locale by calling std::use_facet<std::ctype<CharT>(os.getloc()).widen() with '1' and '0' as arguments.
2) Behaves as an
FormattedInputFunction. After constructing and checking the sentry object, which may skip leading whitespace, extracts up to
N characters from
is and stores the characters in the bitset
Characters are extracted until either
Ncharacters have been read,
- end-of-file occurs in
- the next character is neither
If no characters are extracted,
is.setstate(ios_base::failbit) is called.
|os||-||the character stream to write to|
|is||-||the character stream to read from|
|x||-||the bitset to be read or written|
The character stream that was operated on, e.g.
| performs binary shift left and shift right |
(public member function)