Re: [PATH 2/3] libstdc++: Simplify std::advance istreambuf_iterator overload

2020-09-10 Thread Jonathan Wakely via Gcc-patches
On 09/09/20 22:12 +0200, François Dumont via Libstdc++ wrote: libstdc++: Use only public basic_streambuf methods in std::advance overload std::advance overload for istreambuf_iterator can be implemented using basic_streambuf public pubseekoff method so that it doesn't have to be basic_streambuf

[PATH 2/3] libstdc++: Simplify std::advance istreambuf_iterator overload

2020-09-09 Thread François Dumont via Gcc-patches
libstdc++: Use only public basic_streambuf methods in std::advance overload std::advance overload for istreambuf_iterator can be implemented using basic_streambuf public pubseekoff method so that it doesn't have to be basic_streambuf friend. libstdc++-v3/ChangeLog:     * include/std/streamb

Re: std::advance istreambuf_iterator overload

2017-11-20 Thread Jonathan Wakely
On 20/11/17 07:40 +0100, François Dumont wrote: Here is the latest version I plan to commit after validation. I like the simplified logic for the while-loop. I'd like to keep the change to the money_get/get/[char/wchar_t]/9.cc tests. At the moment those tests passes only because there is no

Re: std::advance istreambuf_iterator overload

2017-11-19 Thread François Dumont
Here is the latest version I plan to commit after validation. I'd like to keep the change to the money_get/get/[char/wchar_t]/9.cc tests. At the moment those tests passes only because there is no operation on the is iterator (like a check for eof). If we add any, internal _M_buf will be resete

Re: std::advance istreambuf_iterator overload

2017-11-16 Thread Tim Song
On Mon, Nov 13, 2017 at 3:32 PM, Daniel Krügler wrote: > but as Jonathan already said, for std::istreambuf_iterator this can > never be true (because of the involved IO operations). > Except, of course, if you advance by zero. It's not a very useful case, for sure...

Re: std::advance istreambuf_iterator overload

2017-11-13 Thread Daniel Krügler
2017-11-13 21:23 GMT+01:00 François Dumont : > On 10/11/2017 21:57, Jonathan Wakely wrote: >>> diff --git a/libstdc++-v3/include/bits/streambuf_iterator.h >>> b/libstdc++-v3/include/bits/streambuf_iterator.h >>> index 0a6c7f9..b60626a 100644 >>> --- a/libstdc++-v3/include/bits/streambuf_iterator.h

Re: std::advance istreambuf_iterator overload

2017-11-13 Thread François Dumont
On 10/11/2017 21:57, Jonathan Wakely wrote: On 09/11/17 22:12 +0100, François Dumont wrote: Hi     Working on istreambuf_iterator I realized that this iterator would really benefit from an std::advance overload so here it is.     Tested under Linux x86_64 normal and debug modes, ok to comm

Re: std::advance istreambuf_iterator overload

2017-11-10 Thread Jonathan Wakely
On 09/11/17 22:12 +0100, François Dumont wrote: Hi     Working on istreambuf_iterator I realized that this iterator would really benefit from an std::advance overload so here it is.     Tested under Linux x86_64 normal and debug modes, ok to commit ? François diff --git a/libstdc++-v3/

std::advance istreambuf_iterator overload

2017-11-09 Thread François Dumont
Hi     Working on istreambuf_iterator I realized that this iterator would really benefit from an std::advance overload so here it is.     Tested under Linux x86_64 normal and debug modes, ok to commit ? François diff --git a/libstdc++-v3/include/bits/streambuf_iterator.h b/libstdc++-v3/inclu