[PATCH] Implement std::advance for istreambuf_iterator using pubseekoff
François Dumont
frs.dumont@gmail.com
Mon Oct 14 20:12:00 GMT 2019
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 friend
declaration.
   * include/bits/streambuf_iterator.h (__copy_move_a2): Re-implement
using
   streambuf pubseekoff.
Tested under Linux x86_64.
Ok to commit ?
François
-------------- next part --------------
A non-text attachment was scrubbed...
Name: istreambuf_ite_advance.patch
Type: text/x-patch
Size: 2529 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20191014/f4dfea1d/attachment.bin>
More information about the Libstdc++
mailing list