Definition at line 355 of file ostream.
sentry | ( | basic_ostream< _CharT, _Traits > & | __os | ) | [inline, explicit] |
The constructor performs preparatory work.
os | The output stream to guard. |
is.tie()->flush()
is called to synchronize the output sequences.If the stream state is still good, then the sentry state becomes true ("okay").
Definition at line 51 of file ostream.tcc.
References ios_base::failbit, basic_ios::good(), basic_ios::setstate(), and basic_ios::tie().
~sentry | ( | ) | [inline] |
Possibly flushes the stream.
If ios_base::unitbuf
is set in os.flags()
, and std::uncaught_exception()
is true, the sentry destructor calls flush()
on the output stream.
Definition at line 383 of file ostream.
References ios_base::badbit, std::uncaught_exception(), and ios_base::unitbuf.
operator bool | ( | ) | const [inline] |