[PATH 3/3] libstdc++: Add std::advance ostreambuf_iterator overload
Jonathan Wakely
jwakely@redhat.com
Thu Sep 10 15:19:01 GMT 2020
On 09/09/20 22:12 +0200, François Dumont via Libstdc++ wrote:
>libstdc++: Add std::advance overload for ostreambuf_iterator
>
>Implement std::advance overload for ostreambuf_iterator using
>basic_streambuf
>pubseekof.
>
>libstdc++-v3/ChangeLog:
>
>Â Â Â Â Â Â Â * include/bits/streambuf_iterator.h (ostreambuf_iterator): Add
>Â Â Â Â Â Â Â std::advance friend declaration.
>Â Â Â Â Â Â Â (advance(ostreambuf_iterator<>&, _Distance)): New.
>Â Â Â Â Â Â Â * testsuite/25_algorithms/advance/ostreambuf_iterator/char/1.cc:
>Â Â Â Â Â Â Â New test.
>Â Â Â Â Â Â Â *
>testsuite/25_algorithms/advance/ostreambuf_iterator/char/1_neg.cc:
>Â Â Â Â Â Â Â New test.
>Â Â Â Â Â Â Â * testsuite/25_algorithms/advance/ostreambuf_iterator/char/2.cc:
>Â Â Â Â Â Â Â New test.
>Â Â Â Â Â Â Â *
>testsuite/25_algorithms/advance/ostreambuf_iterator/char/2_neg.cc:
>Â Â Â Â Â Â Â New test.
>
>Tested under Linux x85_64.
>
>Ok to commit ?
I think relying on seeking here is a bad idea for the same reason as
in my previous email. We don't know what seek does for an arbitrary
derived streambuf, or even if it is possible at all.
More information about the Libstdc++
mailing list