27 Input/output library [input.output]

27.7 Formatting and manipulators [iostream.format]

27.7.3 Output streams [output.streams] Formatted output functions [ostream.formatted] Common requirements [ostream.formatted.reqmts]

Each formatted output function begins execution by constructing an object of class sentry. If this object returns true when converted to a value of type bool, the function endeavors to generate the requested output. If the generation fails, then the formatted output function does setstate(ios_base::failbit), which might throw an exception. If an exception is thrown during output, then ios::badbit is turned on327 in *this's error state. If (exceptions()&badbit) != 0 then the exception is rethrown. Whether or not an exception is thrown, the sentry object is destroyed before leaving the formatted output function. If no exception is thrown, the result of the formatted output function is *this.

The descriptions of the individual formatted output operations describe how they perform output and do not mention the sentry object.

without causing an ios::failure to be thrown.