
18 Aug
2007
18 Aug
'07
7:58 a.m.
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> Regards, Takeshi Mouri