|
Boost Users : |
Subject: [Boost-users] Boost gzip_decompressor - compilation errors
From: einav_i2 (einav_at_[hidden])
Date: 2009-05-14 02:57:04
Hi!
I'm trying to compile the following function on Boost 1.34.1 (Ubuntu 8.04):
void decompress(string &gzipString, string & target)
{
boost::iostreams::filtering_ostream decompressingStream;
boost::iostreams::gzip_decompressor gzdc;
decompressingStream.push(gzdc);
decompressingStream.push(boost::iostreams::back_inserter(target));
decompressingStream << gzipString;
boost::iostreams::flush(decompressingStream);
}
And I'm getting the following (quite long) error:
/usr/include/boost/iostreams/chain.hpp: In member function âvoid
boost::iostreams::detail::chain_base<Self, Ch, Tr, Alloc,
Mode>::push_impl(const T&, int, int) [with T =
boost::iostreams::basic_gzip_decompressor<std::allocator<char> >, Self =
boost::iostreams::chain<boost::iostreams::output, char,
std::char_traits<char>, std::allocator<char> >, Ch = char, Tr =
std::char_traits<char>, Alloc = std::allocator<char>, Mode =
boost::iostreams::output]â:
/usr/include/boost/iostreams/chain.hpp:207: instantiated from âvoid
boost::iostreams::detail::chain_base<Self, Ch, Tr, Alloc, Mode>::push(const
T&, int, int, typename boost::disable_if<boost::iostreams::is_std_io<T>,
void>::type*) [with T =
boost::iostreams::basic_gzip_decompressor<std::allocator<char> >, Self =
boost::iostreams::chain<boost::iostreams::output, char,
std::char_traits<char>, std::allocator<char> >, Ch = char, Tr =
std::char_traits<char>, Alloc = std::allocator<char>, Mode =
boost::iostreams::output]â
/usr/include/boost/iostreams/chain.hpp:465: instantiated from âvoid
boost::iostreams::detail::chain_client<Chain>::push_impl(const T&, int, int)
[with T = boost::iostreams::basic_gzip_decompressor<std::allocator<char> >,
Chain = boost::iostreams::chain<boost::iostreams::output, char,
std::char_traits<char>, std::allocator<char> >]â
/usr/include/boost/iostreams/chain.hpp:453: instantiated from âvoid
boost::iostreams::detail::chain_client<Chain>::push(const T&, int, int,
typename boost::disable_if<boost::iostreams::is_std_io<T>, void>::type*)
[with T = boost::iostreams::gzip_decompressor, Chain =
boost::iostreams::chain<boost::iostreams::output, char,
std::char_traits<char>, std::allocator<char> >]â
main.cpp:93: instantiated from here
/usr/include/boost/iostreams/chain.hpp:233: error: invalid application of
âsizeofâ to incomplete type âboost::STATIC_ASSERTION_FAILURE<false>â
/usr/include/boost/iostreams/stream_buffer.hpp: At global scope:
/usr/include/boost/iostreams/stream_buffer.hpp: In instantiation of
âboost::iostreams::stream_buffer<boost::iostreams::basic_gzip_decompressor<std::allocator<char>
>, std::char_traits<char>, std::allocator<char>, boost::iostreams::output>â:
/usr/include/boost/iostreams/chain.hpp:246: instantiated from âvoid
boost::iostreams::detail::chain_base<Self, Ch, Tr, Alloc,
Mode>::push_impl(const T&, int, int) [with T =
boost::iostreams::basic_gzip_decompressor<std::allocator<char> >, Self =
boost::iostreams::chain<boost::iostreams::output, char,
std::char_traits<char>, std::allocator<char> >, Ch = char, Tr =
std::char_traits<char>, Alloc = std::allocator<char>, Mode =
boost::iostreams::output]â
/usr/include/boost/iostreams/chain.hpp:207: instantiated from âvoid
boost::iostreams::detail::chain_base<Self, Ch, Tr, Alloc, Mode>::push(const
T&, int, int, typename boost::disable_if<boost::iostreams::is_std_io<T>,
void>::type*) [with T =
boost::iostreams::basic_gzip_decompressor<std::allocator<char> >, Self =
boost::iostreams::chain<boost::iostreams::output, char,
std::char_traits<char>, std::allocator<char> >, Ch = char, Tr =
std::char_traits<char>, Alloc = std::allocator<char>, Mode =
boost::iostreams::output]â
/usr/include/boost/iostreams/chain.hpp:465: instantiated from âvoid
boost::iostreams::detail::chain_client<Chain>::push_impl(const T&, int, int)
[with T = boost::iostreams::basic_gzip_decompressor<std::allocator<char> >,
Chain = boost::iostreams::chain<boost::iostreams::output, char,
std::char_traits<char>, std::allocator<char> >]â
/usr/include/boost/iostreams/chain.hpp:453: instantiated from âvoid
boost::iostreams::detail::chain_client<Chain>::push(const T&, int, int,
typename boost::disable_if<boost::iostreams::is_std_io<T>, void>::type*)
[with T = boost::iostreams::gzip_decompressor, Chain =
boost::iostreams::chain<boost::iostreams::output, char,
std::char_traits<char>, std::allocator<char> >]â
main.cpp:93: instantiated from here
/usr/include/boost/iostreams/stream_buffer.hpp:66: error: invalid
application of âsizeofâ to incomplete type
âboost::STATIC_ASSERTION_FAILURE<false>â
A similar "compress" function seem to compile without any problems.
Any ideas what can cause this error?
Thanks,
Einav
-- View this message in context: http://www.nabble.com/Boost-gzip_decompressor---compilation-errors-tp23535389p23535389.html Sent from the Boost - Users mailing list archive at Nabble.com.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net