다음을 통해 공유


basic_ostream::sentry

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( );
};

설명

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.

요구 사항

Header: <ostream>

네임스페이스: std

참고 항목

참조

basic_ostream 클래스

iostream 프로그래밍

iostreams 규칙