Boost logo

Boost :

From: Jonathan Turkanis (turkanis_at_[hidden])
Date: 2008-01-05 16:05:12


Hi Steve,

Steve Nutt wrote:
> I've created a device with the boost::iostreams::dual_seekable
> category to use with the boost::iostreams::stream class, but I'm
> having trouble implementing seek.

> When I call seekp on the stream, seek on my device is called with a
> which (openmode) of both BOOST_IOS::in and BOOST_IOS::out. I would
> have expected for a call to seekp the which parameter in the seek
> call on my device would be BOOST_IOS::out, and calling seekg would
> set which to BOOST_IOS::in.

> The following code in
> boost\iostream\detail\streambuf\indirect_streambuf.hpp ignores the
> which argument passed and passes on through both in and out.

> Is this correct, and if so how do I implement seeking when using a
> dual head device?

This is almost certainly a bug. I have created a ticket
(http://svn.boost.org/trac/boost/ticket/1551) and will make sure it is
fixed for 1.36.

> Many thanks,

> Steve Nutt

-- 
Jonathan Turkanis
CodeRage
http://www.coderage.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk