This is the mail archive of the 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]

Re: [v3] more istream::ignore cleanups

Benjamin Kosnik wrote:|

Ah ha. Thanks Gaby for the key bit. Serves me right for thinking it was
simple and not looking though the archives... I can see why Paolo was so
exclamatory now!

Sorry about that Benjamin, but I have been refininf and tweaking those function
both from the conformance and the performance point of views for months, you
know! I'm going in vacations for just a few days and was *really* afraid of
possible regressions.

It looks like, in these situations, _M_gcount should be set to
numeric_limits::max() here. Ie, in the LFS case, say delim is at max +
5, _M_gcount will not be set correctly (ie, not max().)

Indeed, we can have that, if we want: whatever we do is not strictly speaking
conforming since the number of extracted chars in principle should always
match gcount and with LFS can be much bigger. The current (and recent)
situation) gives the user more information (i.e. at least the "modulo" of the
total number of extracted chars) whereas returning max() is more clean. Let
me think a little more about it: we can always set _M_gcount = max at the
end if we eventually decide to do that, without changing the main loop.

...yes, please do. I see a couple previous requests for this as well as
something that fails, test-wise, in the archives. Hopefully something
along these lines will prevent others from going at this half-baked as



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]