Library C++ conformance question

Martin Sebor sebor@roguewave.com
Fri Jun 16 23:16:00 GMT 2006


Paolo Carlini wrote:
> 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.

I guess I should write this one up as a separate issue.

Martin



More information about the Libstdc++ mailing list