Class basic_ostream::sentry Constructor

Prepare for formatted or unformatted output.

  explicit sentry(basic_ostream<charT, traits>& os);
  
Remarks

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