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] | |
Hi again Martin,
FWIW, I agree with your reading that the facets should ignore the initial value of the iostate argument. As for setting eofbit, that's now required (or will be in the next standard) -- see http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#248
In this area we have got another consistency issue between the facets (num, money, time), which we discussed briefly time ago, Nathan also participating: whether eventually eofbit and/or failbit are *assigned* vs *OR-ed* to err. AFAICS, if we carefully compare the blanket in 22.2 and the individual facets, it's a big mess.
I seem to remember that Nathan strongly favor OR everywhere, both for eofbit and failbit (and we are currently implementing that behavior).
That's my take on it too. I think we should be able to fix this by saying "sets foobit in err" instead of "assigns foobit to err" everywhere. Although that alone isn't going to do it since it would assume err to be initially set to goodbit. So perhaps a blanket statement in 22.2 saying that all the get functions start out by setting err to goodbit and then set failbit in err on error and/or eofbit when they encounter the EOF.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |