1328. istream extractors not setting failbit if eofbit is already set

Section: 31.7.5.2.4 [istream.sentry] Status: Resolved Submitter: Paolo Carlini Opened: 2010-02-17 Last modified: 2021-06-06

Priority: Not Prioritized

View all other issues in [istream.sentry].

View all issues with Resolved status.

Discussion:

Basing on the recent discussion on the library reflector, see c++std-lib-27728 and follow ups, I hereby formally ask for LWG 419 to be re-opened, the rationale being that according to the current specifications, per n3000, it seems actually impossible to seek away from end of file, contrary to the rationale which led 342 to its closure as NAD. My request is also supported by Martin Sebor, and I'd like also to add, as tentative proposed resolution for the re-opened issue, the wording suggested by Sebor, thus, change the beginning of [istream::sentry]/2, to:

2 Effects: If (!noskipws && !is.good()) is false true, calls is.setstate(failbit). Otherwise prepares for formatted or unformatted input. ...

[ 2010-10 Batavia ]

Resolved by adopting n3168.

Previous proposed resolution:

Change [istream::sentry] p.2:

2 Effects: If (!noskipws && !is.good()) is false true, calls is.setstate(failbit). Otherwise prepares for formatted or unformatted input. ...

Proposed resolution:

Addressed by paper n3168.