Class basic_istream::sentry Constructor

Prepare for formatted or unformatted input

  explicit sentry
  (basic_istream<charT, traits>& is, bool noskipws = false);
  
Remarks

If after the operation is.good() is true ok_ equals true otherwise ok_ equals false. The constructor may call setstate(failbit) which may throw an exception.