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

2600. ios_base must store inaccessible iostate flags

Section: [] Status: LEWG Submitter: David Krauss Opened: 2016-03-14 Last modified: 2017-02-03

Priority: Not Prioritized

View all other issues in [].

View all issues with LEWG status.


DR 41, "Ios_base needs clear(), exceptions()" stopped short of providing the interface suggested in its title, but it did require the underlying state to be stored in ios_base. Because rdstate() is also missing, ios_base manipulators relying on iword and pword cannot detect failure. The only safe alternative is to manipulate a derived class, which must be a template.

libc++ already provides the interface as a nonconforming extension. libstdc++ implements the internal state but leaves it frustratingly inaccessible, as specified. Any conforming implementation should be able to provide the interface without ABI problems.

[2016-04, Issues Telecon]

This is really a request for an (feature) API. Passing to LEWG.

Proposed resolution: