Standard C++ Library Reference ISO/IEC (VERSION3)
catch (...)
{try
{setstate(badbit); }
catch (...)
{}
if ((exceptions() & badbit) != 0)
throw; }}
width(0); // except for operator<<(Elem)
setstate(state);
return (*this);
Two other member functions are unformatted output functions. They follow the pattern:
iostate state = goodbit;
const sentry ok(*this);
if (!ok)
state |= badbit;
else
{try
{<obtain and insert elements
accumulate flags in state> }
catch (...)
{try
{setstate(badbit); }
catch (...)
{}
if ((exceptions() & badbit) != 0)
throw; }}
setstate(state);
return (*this);
Both groups of functions call setstate(badbit) if they encounter a failure while inserting
elements.
An object of class basic_istream<Elem, Tr> stores only a virtual public base object of
class basic_ios<Elem, Tr>
basic_ostream::basic_ostream
explicit basic_ostream(basic_streambuf<Elem, Tr> *strbuf);
The constructor initializes the base class by calling init(strbuf).
basic_ostream::flush
basic_ostream& flush();
If rdbuf() is not a null pointer, the function calls rdbuf()->pubsync(). If that returns -1,