Assigns initial values to the components of its base classes by calling the inherited member ios::init with sb as argument.
(2) copy constructor (deleted)
Deleted: no copy constructor.
(3) move constructor (protected)
Acquires the contents of x, except its associated stream buffer: It copies x's gcount value and then calls ios::move to transfer x's ios components. x is left with a gcount value of zero, not tied, and with its associated stream buffer unchanged (all other components of x are in an unspecified but valid state after the call).
This example code uses a filebuf object (derived from streambuf) to open a file called test.txt. The buffer is passed as parameter to the constructor of the istream object is, associating it to the stream. Then, the program uses the input stream to print its contents to cout.
Objects of istream classes are seldom constructed directly. Generally some derived class is used (like the standard ifstream or istringstream).
Data races
The object pointed by sb may be accessed and/or modified.
Exception safety
If an exception is thrown, the only side effects may come from accessing/modifying sb.