This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofTC1 status.
Section: 31.7.6.4[ostream.unformatted]Status:TC1Submitter: Matt AusternOpened: 1998-08-11Last modified: 2016-01-28
Priority:Not Prioritized
View all otherissues in [ostream.unformatted].
View all issues withTC1 status.
Discussion:
Clause 27 details an exception-handling policy for formatted input,unformatted input, and formatted output. It says nothing forunformatted output (27.6.2.6). 27.6.2.6 should either include the samekind of exception-handling policy as in the other three places, orelse it should have a footnote saying that the omission isdeliberate.
Proposed resolution:
In 27.6.2.6, paragraph 1, replace the last sentence ("In anycase, the unformatted output function ends by destroying the sentryobject, then returning the value specified for the formatted outputfunction.") with the following text:
If an exception is thrown during output, then
ios::badbitisturned on [Footnote: without causing anios::failureto bethrown.] in*this's error state. If(exceptions() &badbit) != 0then the exception is rethrown. In any case, theunformatted output function ends by destroying the sentry object,then, if no exception was thrown, returning the value specified forthe formatted output function.
Rationale:
This exception-handling policy is consistent with that of formattedinput, unformatted input, and formatted output.