I'm trying to use iostreams::mapped_file as a source for a
iostreams::filtered_istream, and it's not quite working out.
I create my chain like this:
boost::iostreams::filtered_istream in;
in.push(boost::iostreams::zlib_decompressor());
in.push(boost::iostreams::mapped_file("some file name")); // error here
I haven't dug too deeply yet because I'm hoping this is not new or
obscure.
gcc 3.3.5 on OpenBSD 3.9 reports the following error:
[03.01.07 12:13:28 bc@qui-gon libgit++]$ scons tools
Skipping checks...
g++ -Wall -Werror -fno-builtin -g -O0 -fno-default-inlines -DVERSION="0.0.4" -I/usr/local/include/boost-1_33_1 -Isrc -c -o src/myprogram.o src/myprogram.cpp
/usr/local/include/boost-1_33_1/boost/iostreams/optimal_buffer_size.hpp: In
function `streamsize boost::iostreams::optimal_buffer_size(const T&) [with T
= boost::iostreams::mapped_file]':
/usr/local/include/boost-1_33_1/boost/iostreams/chain.hpp:236: instantiated from `void boost::iostreams::detail::chain_base::push_impl(const T&, int, int) [with T = boost::iostreams::mapped_file, Self = boost::iostreams::chain, Ch = char, Tr = std::char_traits<char>, Alloc = std::allocator<char>, Mode = boost::iostreams::input]'
/usr/local/include/boost-1_33_1/boost/iostreams/chain.hpp:179: instantiated from `void boost::iostreams::detail::chain_base::push(const T&, int, int, typename boost::disable_if::type*) [with T = boost::iostreams::mapped_file, Self = boost::iostreams::chain, Ch = char, Tr = std::char_traits<char>, Alloc = std::allocator<char>, Mode = boost::iostreams::input]'
/usr/local/include/boost-1_33_1/boost/iostreams/chain.hpp:484: instantiated from `void boost::iostreams::detail::chain_client<Chain>::push_impl(const T&, int, int) [with T = boost::iostreams::mapped_file, Chain = boost::iostreams::chain]'
/usr/local/include/boost-1_33_1/boost/iostreams/chain.hpp:472: instantiated from `void boost::iostreams::detail::chain_client<Chain>::push(const T&, int, int, typename boost::disable_if::type*) [with T = boost::iostreams::mapped_file, Chain = boost::iostreams::chain]'
src/myprogram.cpp:27: instantiated from here
/usr/local/include/boost-1_33_1/boost/iostreams/optimal_buffer_size.hpp:38: error: '
struct
boost::iostreams::detail::optimal_buffer_size_implboost::iostreams::mapped_file
' has no member named 'optimal_buffer_size'
scons: *** [src/myprogram.o] Error 1
--
Benjamin Collins
ben.collins@acm.org