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] |
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.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |