This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of TC1 status.
Section: 31.5.2 [ios.base] Status: TC1 Submitter: Nathan Myers Opened: 1998-08-06 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [ios.base].
View all issues with TC1 status.
Duplicate of: 157
Discussion:
The description of ios_base::iword() and pword() in 31.5.2.5 [ios.members.static], say that if they fail, they "set badbit, which may throw an exception". However, ios_base offers no interface to set or to test badbit; those interfaces are defined in basic_ios<>.
Proposed resolution:
Change the description in 31.5.2.6 [ios.base.storage] in paragraph 2, and also in paragraph 4, as follows. Replace
If the function fails it sets badbit, which may throw an exception.
with
If the function fails, and *this is a base sub-object of a basic_ios<> object or sub-object, the effect is equivalent to calling basic_ios<>::setstate(badbit) on the derived object (which may throw failure).
[Kona: LWG reviewed wording; setstate(failbit) changed to setstate(badbit).]