[PATCH] Cleanup in istream.tcc

Gabriel Dos Reis gdr@integrable-solutions.net
Tue Sep 23 21:41:00 GMT 2003


Paolo Carlini <pcarlini@unitus.it> writes:

| 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...

I'm not sure I see why that is necessary. 

-- Gaby



More information about the Libstdc++ mailing list