basic_istream::sentry

嵌套类和声明构造描述格式的单行无格式的输入函数的对象。

class sentry {
public:
    explicit sentry(
        basic_istream<Elem, Tr>& _Istr,
        bool _Noskip = false
    );
    operator bool( ) const;
};

备注

如果 _Istr. 为 True,则构造函数:

  • 调用 _Istr。关系刷新 )>,则 _Istr。tie 不为 null 指针

  • 从效率上讲调用 ws(_Istr),则 _Istr。标志 skipws& 是非零

如果任何这样,在准备好之后,_Istr。good 是错误,的构造函数调用 _Istr。setstate(failbit)。 在任何情况下,构造函数中 _Istr返回的值。在 状态good。 对 operator bool 的一个调用提供此存储最新的值。

要求

页眉: <istream>

命名空间: std

请参见

参考

basic_istream 类

iostream 编程

iostreams 约定