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

429. typo in basic_ios::clear(iostate)

Section: 31.5.4.4 [iostate.flags] Status: Dup Submitter: Martin Sebor Opened: 2003-09-18 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [iostate.flags].

View all issues with Dup status.

Duplicate of: 412

Discussion:

The Effects clause in 27.4.4.3, p5 describing the effects of a call to the ios_base member function clear(iostate state) says that the function only throws if the respective bits are already set prior to the function call. That's obviously not the intent. If it was, a call to clear(badbit) on an object for which (rdstate() == goodbit && exceptions() == badbit) holds would not result in an exception being thrown.

Proposed resolution:

The text ought to be changed from
"If (rdstate() & exceptions()) == 0, returns. ..."
to
"If (state & exceptions()) == 0, returns. ..."

Rationale: