[PATCH] Cleanup in istream.tcc
Paolo Carlini
pcarlini@unitus.it
Tue Sep 23 21:37:00 GMT 2003
Martin Sebor wrote:
> Pétur Runólfsson wrote:
>
>> The call to setstate is redundant since sentry::operator bool() only
>> returns false if sentry::sentry() has already set failbit.
>
> Not necessarily. Failbit (or any other bit) may have been set prior
> to the call to the ctor, in which case the sentry might do nothing
> and the input function would then call setstate(failbit).
>
> In particular, readsome() is explicitly required to set failbit when
> the sentry is false.
[snip]
Thanks Martin.
Pétur? Benjamin? I'm afraid we have to revert this...
Paolo.
More information about the Libstdc++
mailing list