Re: [PATCH] Implement std::advance for istreambuf_iterator using pubseekoff

2023-04-24 Thread François Dumont via Gcc-patches
I had totally forgotten about it myself. The occasion to take a fresh look at it. Here is a new version considering 1st pubseekoff call returned value to find out if it can be used. I removed the check/comparison with 2nd call result as it's not usable. In new 4_neg.cc test case if I ask to ad

Re: [PATCH] Implement std::advance for istreambuf_iterator using pubseekoff

2023-03-31 Thread Jonathan Wakely via Gcc-patches
On Tue, 15 Oct 2019 at 21:20, François Dumont wrote: > > Here is an update to set _M_sbuf to null if the user advance too much. > > Note that in this case the streambuf remains un-modified which is > different from the current implementation. I think it is another > enhancement. > > I also change t

Re: [PATCH] Implement std::advance for istreambuf_iterator using pubseekoff

2019-10-15 Thread François Dumont
Here is an update to set _M_sbuf to null if the user advance too much. Note that in this case the streambuf remains un-modified which is different from the current implementation. I think it is another enhancement. I also change the Debug assertion message for something more dedicated to std

[PATCH] Implement std::advance for istreambuf_iterator using pubseekoff

2019-10-14 Thread François Dumont
The same way I proposed to review std::copy overload for istreambuf_iterator we can implement std::advance using pubseekoff. It is both a cleaner implementation and avoids yet another friend declaration.     * include/std/streambuf     (advance(istreambuf_iterator<>&, _Distance)): Remove fri