373. Are basic_istream and basic_ostream to use (exceptions()&badbit) != 0 ?

Section: 30.7.4.2.1 [istream.formatted.reqmts], 30.7.5.2.1 [ostream.formatted.reqmts] Status: CD1 Submitter: Keith Baker Opened: 2002-07-23 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [istream.formatted.reqmts].

View all issues with CD1 status.

Discussion:

In 30.7.4.2.1 [istream.formatted.reqmts] and 30.7.5.2.1 [ostream.formatted.reqmts] (exception()&badbit) != 0 is used in testing for rethrow, yet exception() is the constructor to class std::exception in 21.7.2 [type.info] that has no return type. Should member function exceptions() found in 30.5.5 [ios] be used instead?

Proposed resolution:

In 30.7.4.2.1 [istream.formatted.reqmts] and 30.7.5.2.1 [ostream.formatted.reqmts], change "(exception()&badbit) != 0" to "(exceptions()&badbit) != 0".

Rationale:

Fixes an obvious typo.