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]

Re: Update on some PRs I'm working on


Pétur Runólfsson wrote:

- 9875 and 9178
These are both about deficiencies for encodings > 1. They are
not too difficult to fix, IMO. I have already the fixes for
9875, except the underflow bits (yesterday Pétur provided some
testcases which I asked).


The best fix for underflow() is probably to add

if (gptr() < egptr())
 return *gptr();

(this vaguely reminds me page 678 of Josuttis ;)

at the top (of course using traits operators and handling uflow
correctly). I think the seekoff can then be avoided.
This code should work for all values of codecvt::encoding(),
as well as for pipes and other things for which seekoff
doesn't work.

Thanks Pétur for the suggestion. I will take into account when, in a few days I hope,
I will actually get to 9875 and 9178 in detail.


Paolo.


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