basic_istream::sentry

class sentry {
public:
    explicit sentry(basic_istream<E, T>& is, bool noskip = false);
    operator bool() const;
    };

The nested class describes an object whose declaration structures the formatted input functions and the unformatted input functions. The constructor effectively calls is.ipfx(noskip) and stores the return value. operator bool() delivers this return value. The destructor effectively calls is.isfx().