Each formatted output function begins execution by constructing an object of class
If this object returns
when converted to a value of type
the function endeavors
to generate the requested output.
If the generation fails, then the formatted output function does
which might throw an exception.
If an exception is thrown during output, then
is turned on
(exceptions()&badbit) != 0
then the exception is rethrown.
Whether or not an exception is thrown, the
object is destroyed before leaving the formatted output function.
If no exception is thrown, the result of the formatted output function
If a formatted output function of a stream os
padding, it does so as
Given a charT
character sequence seq
is the character type of the stream, if
the length of seq
is less than os.width()
, then enough copies of
are added to this sequence as necessary to pad to a
width of os.width()
(os.flags() & ios_base::adjustfield) == ios_base::left
, the fill characters are placed
after the character sequence; otherwise, they are placed before the