public member function
<istream> <iostream>

std::iostream::iostream

initialization (1)
explicit iostream (streambuf* sb);
initialization (1)
explicit iostream (streambuf* sb);
copy (2)
iostream& (const iostream&) = delete;
move (3)
protected: iostream& (iostream&& x);
Construct object
Constructs a iostream object.

(1) inititalization constructor
Assigns initial values to the components of its base classes by calling the constructors its base classes istream and ostream with sb as argument.
Notice that this calls member ios::init twice.
(2) copy constructor (deleted)
Deleted: no copy constructor.
(3) move constructor (protected)
Acquires the contents of x, except its associated stream buffer: It calls istream's constructor with move(x) as argument, transferring some of x's internal components to the object: 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).

Parameters

sb
pointer to a streambuf object with the same template parameters as the iostream object.
char_type and traits_type are member types defined as aliases of the first and second class template parameters, respectively (see iostream types).
x
Another iostream of the same type (with the same class template arguments charT and traits).

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.

See also