共用方式為


basic_ostream::sentry

巢狀類別宣告結構描述格式化輸出功能和未格式化的輸出函式的物件。

class sentry {
public:
    explicit sentry( basic_ostream<_Elem, _Tr>& _Ostr );
    operator bool( ) const;
    ~sentry( );
};

備註

巢狀類別宣告結構描述格式化輸出功能和未格式化的輸出函式的物件。 如果 ostr.true ,並 ostr.WITH TIES 不為 null 指標,建構函式呼叫 ostr.tie->清除。 建構函式會 status並儲存 ostr.good 傳回的值。 為 operator bool 較新的呼叫所提供的儲存值。

如果 uncaught_exception 傳回 false ,並 旗標 & unitbuf 為非零值 (Nonzero),則呼叫解構函式 清除

需求

標題: <ostream>

命名空間: std

請參閱

參考

basic_ostream Class

iostream 程式設計

iostreams 慣例