Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The nested class describes an object whose declaration structures the formatted output functions and the unformatted output functions.
class sentry {
public:
explicit sentry( basic_ostream<_Elem, _Tr>& _Ostr );
operator bool( ) const;
~sentry( );
};
Remarks
The nested class describes an object whose declaration structures the formatted output functions and the unformatted output functions. If ostr.good is true and ostr.tie is not a null pointer, the constructor calls ostr.tie->flush. The constructor then stores the value returned by ostr.good in status. A later call to operator bool delivers this stored value.
If uncaught_exception returns false and flags & unitbuf is nonzero, the destructor calls flush.
Requirements
Header: <ostream>
Namespace: std