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

François Dumont frs.dumont@gmail.com
Wed Sep 9 20:12:14 GMT 2020


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/streambuf
         (advance(istreambuf_iterator<>&, _Distance)): Remove friend 
declaration.
         * include/bits/streambuf_iterator.h
         (advance(istreambuf_iterator<>&, _Distance)): Re-implement using
         streambuf pubseekoff.
         * 
testsuite/25_algorithms/advance/istreambuf_iterators/char/3.cc: New
         test.

Tested under Linux x86_64.

Ok to commit ?

François

-------------- next part --------------
A non-text attachment was scrubbed...
Name: advance_istreambuf_iterator.patch
Type: text/x-patch
Size: 4414 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20200909/98b00f49/attachment.bin>


More information about the Libstdc++ mailing list