[PATCH] Review std::copy istreambuf_iterator specialization

François Dumont frs.dumont@gmail.com
Wed Oct 9 04:42:00 GMT 2019


Hi

     Following what has been done for std::copy_n I think we could 
simplify the __copy_move_a2 overload to also use sgetn. Code is simpler 
and we avoid a friend declaration.

     Tested under Linux x86_64.


     * include/std/streambuf (__copy_move_a2): Remove friend declaration.
     * include/bits/streambuf_iterator.h (__copy_move_a2): Re-implement 
using
     streambuf in_avail and sgetn.

     Ok to commit ?

François

-------------- next part --------------
A non-text attachment was scrubbed...
Name: istreambuf_copy.patch
Type: text/x-patch
Size: 2168 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20191009/7f6880a9/attachment.bin>


More information about the Libstdc++ mailing list