[iostream] Bug in indirect_streambuf::seek_impl

12 Nov
2012
12 Nov
'12
12:12 p.m.
Hi Currently indirect_streambuf::seek_impl always modifies input and output pointers with code: setg(0, 0, 0); setp(0, 0); See detail/indirect_streambuf.hpp. However, this is incorrect for dual seekable streams buffers which only modifies one set of pointers on each seek (in or out). As a consequence, dual seekable devices cannot be correctly seek. Those 2 lines should be replaced by: if (is_convertible<category, dual_seekable>::value) { if (which == BOOST_IOS::in) { setg(0, 0, 0); } if (which == BOOST_IOS::out) { setp(0, 0); } } else { setg(0, 0, 0); setp(0, 0); } I have created ticket https://svn.boost.org/trac/boost/ticket/7681 Thanks, Jorge
4596
Age (days ago)
4596
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jorge Lodos Vigil