Boost logo

Boost :

From: Takeshi Mouri (takeshi.mouri.net_at_[hidden])
Date: 2007-08-18 03:58:13

Schalk Cronje wrote:

> In both of the implementations of mapped_file_source and
> mapped_file_sink, the devices are not seekable (whereas
> basic_array_source and basic_array_sink are).
> I am wondering whether there is a rationale for this, or whether it was
> simply an oversight in development. Since mapped_files are still
> contiguous piece of memory I see no reason why they should not be
> seekable.

No. Because the DirectDevice doesn't have a stream position.
The DirectDevice is not strictly a Device.
If you use the class direct_adapter, you can get a Seekable.

See also:
#include <boost/iostreams/detail/adapter/direct_adapter.hpp>

Takeshi Mouri

Boost list run by bdawes at, gregod at, cpdaniel at, john at