[RFC] err |= ios_base::failbit or err = ios_base::failbit?!?

Benjamin Kosnik bkoz@redhat.com
Wed Jan 7 06:02:00 GMT 2004


>Which one? ;-) I'm not too concerned about any breakage since
>the existing requirements are already inconsistent among the
>facets:
>
>num_get:   set iostate = goodbit/eofbit on success,
>            set iostate = eofbit/failbit on error
>money_get: leave iostate alone on success,
>            set iostate |= eofbit/failbit on error
>time_get:  leave iostate alone on success,
>            set iostate = failbit on parse error

Yep. I agree with you here 100%.

(FYI I actually did a map of iostate settings for iostreams. It's
incomplete but perhaps useful still, since there are so many
inconsistencies.)

>Okay, I see your response to Carlo. So what you're proposing is
>to change num_get not to assign goodbit on success. A change would
>also be needed to allow time_get to set eofbit since 22.2, p2 does
>not mention it. The mention of "parsing" should also be stricken
>from 22.2, p2, since other types of errors might occur and should
>be reported. Agreed? Anything else?

This sounds good to me.

-benjamin



More information about the Libstdc++ mailing list