This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


>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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]