std::basic_ostream::sentry
From cppreference.com
Template:cpp/io/basic ostream/sentry/navbar
| Defined in header <ostream>
|
||
| template< class CharT, class Traits = std::char_traits<CharT> > class std::basic_istream<charT,traits>::sentry |
||
An object of class basic_ostream::sentry is constructed in local scope at the beginning of each member function of std::basic_ostream that performs output (both formatted and unformatted). Its constructor prepares the output stream: checks if the stream is already in a failed state, flushes the tie()'d output streams, and performs other implementation-defined tasks if necessary. Implementation-defined cleanup, as well as flushing of the output stream if necessary, is performed in the destructor, so that it is guaranteed to happen if exceptions are thrown during output.
Member functions
| finalizes the stream object after formatted output or after exception, if necessary (public member function) | |
| operator= |
the assignment operator is deleted (public member function) |
Example
| This section is incomplete Reason: no example |