This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of CD1 status.

412. Typo in 27.4.4.3

Section: 31.5.4.4 [iostate.flags] Status: CD1 Submitter: Martin Sebor Opened: 2003-07-10 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [iostate.flags].

View all issues with CD1 status.

Duplicate of: 429

Discussion:

The Effects clause in 31.5.4.4 [iostate.flags] paragraph 5 says that the function only throws if the respective bits are already set prior to the function call. That's obviously not the intent. The typo ought to be corrected and the text reworded as: "If (state & exceptions()) == 0, returns. ..."

Proposed resolution:

In 31.5.4.4 [iostate.flags] paragraph 5, replace "If (rdstate() & exceptions()) == 0" with "If ((state | (rdbuf() ? goodbit : badbit)) & exceptions()) == 0".

[Kona: the original proposed resolution wasn't quite right. We really do mean rdstate(); the ambiguity is that the wording in the standard doesn't make it clear whether we mean rdstate() before setting the new state, or rdsate() after setting it. We intend the latter, of course. Post-Kona: Martin provided wording.]