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.