Opened 6 years ago
Last modified 6 years ago
#12219 new Support Requests
Compilation error using input_seekable with gzip_decompressor()
Reported by: | Owned by: | Jonathan Turkanis | |
---|---|---|---|
Milestone: | To Be Determined | Component: | iostreams |
Version: | Boost 1.58.0 | Severity: | Problem |
Keywords: | GZIP, BZIP decompressor, seekable device | Cc: |
Description
Hello:
I am trying to use boost:iostream::input_seekable and GZIP decompressor. But, when the push function is called the compiler show me the error below. I posted the code too.
std::ifstream file("file.tgz"); boost::iostreams::filtering_streambuf<boost::iostreams::input_seekable> in; in.push(boost::iostreams::gzip_decompressor());// here the error C2338, if I comment this line the error is gone in.push(file);
C:\Users\Efrain\Documents\CAMsoftware\trunk\thirdparty\boost\boost/iostreams/chain.hpp(244): error C2338: (is_convertible<category, Mode>::value) 1> C:\Users\Efrain\Documents\CAMsoftware\trunk\thirdparty\boost\boost/iostreams/chain.hpp(216) : see reference to function template instantiation 'void boost::iostreams::detail::chain_base<boost::iostreams::chain<Mode,Ch,Tr,Alloc>,Ch,Tr,Alloc,Mode>::push_impl<T>(const T &,std::streamsize,std::streamsize)' being compiled 1> with 1> [ 1> Mode=boost::iostreams::input_seekable 1> , Ch=char 1> , Tr=std::char_traits<char> 1> , Alloc=std::allocator<char> 1> , T=boost::iostreams::basic_bzip2_decompressor<std::allocator<char>> 1> ] 1> C:\Users\Efrain\Documents\CAMsoftware\trunk\thirdparty\boost\boost/iostreams/chain.hpp(216) : see reference to function template instantiation 'void boost::iostreams::detail::chain_base<boost::iostreams::chain<Mode,Ch,Tr,Alloc>,Ch,Tr,Alloc,Mode>::push_impl<T>(const T &,std::streamsize,std::streamsize)' being compiled 1> with 1> [ 1> Mode=boost::iostreams::input_seekable 1> , Ch=char 1> , Tr=std::char_traits<char> 1> , Alloc=std::allocator<char> 1> , T=boost::iostreams::basic_bzip2_decompressor<std::allocator<char>> 1> ] 1> C:\Users\Efrain\Documents\CAMsoftware\trunk\thirdparty\boost\boost/iostreams/chain.hpp(499) : see reference to function template instantiation 'void boost::iostreams::detail::chain_base<boost::iostreams::chain<Mode,Ch,Tr,Alloc>,Ch,Tr,Alloc,Mode>::push<T>(const T &,std::streamsize,std::streamsize,void *)' being compiled 1> with 1> [ 1> Mode=boost::iostreams::input_seekable 1> , Ch=char 1> , Tr=std::char_traits<char> 1> , Alloc=std::allocator<char> 1> , T=boost::iostreams::basic_bzip2_decompressor<std::allocator<char>> 1> ] 1> C:\Users\Efrain\Documents\CAMsoftware\trunk\thirdparty\boost\boost/iostreams/chain.hpp(499) : see reference to function template instantiation 'void boost::iostreams::detail::chain_base<boost::iostreams::chain<Mode,Ch,Tr,Alloc>,Ch,Tr,Alloc,Mode>::push<T>(const T &,std::streamsize,std::streamsize,void *)' being compiled 1> with 1> [ 1> Mode=boost::iostreams::input_seekable 1> , Ch=char 1> , Tr=std::char_traits<char> 1> , Alloc=std::allocator<char> 1> , T=boost::iostreams::basic_bzip2_decompressor<std::allocator<char>> 1> ] 1> C:\Users\Efrain\Documents\CAMsoftware\trunk\thirdparty\boost\boost/iostreams/chain.hpp(488) : see reference to function template instantiation 'void boost::iostreams::detail::chain_client<Self>::push_impl<T>(const T &,std::streamsize,std::streamsize)' being compiled 1> with 1> [ 1> Self=boost::iostreams::chain<boost::iostreams::input_seekable,char,std::char_traits<char>,std::allocator<char>> 1> , T=boost::iostreams::basic_bzip2_decompressor<std::allocator<char>> 1> ] 1> C:\Users\Efrain\Documents\CAMsoftware\trunk\thirdparty\boost\boost/iostreams/chain.hpp(488) : see reference to function template instantiation 'void boost::iostreams::detail::chain_client<Self>::push_impl<T>(const T &,std::streamsize,std::streamsize)' being compiled 1> with 1> [ 1> Self=boost::iostreams::chain<boost::iostreams::input_seekable,char,std::char_traits<char>,std::allocator<char>> 1> , T=boost::iostreams::basic_bzip2_decompressor<std::allocator<char>> 1> ] 1> source\c_archive.cpp(60) : see reference to function template instantiation 'void boost::iostreams::detail::chain_client<Self>::push<boost::iostreams::basic_bzip2_decompressor<std::allocator<char>>>(const T &,std::streamsize,std::streamsize,void *)' being compiled 1> with 1> [ 1> Self=boost::iostreams::chain<boost::iostreams::input_seekable,char,std::char_traits<char>,std::allocator<char>> 1> , T=boost::iostreams::basic_bzip2_decompressor<std::allocator<char>> 1> ] 1> source\c_archive.cpp(60) : see reference to function template instantiation 'void boost::iostreams::detail::chain_client<Self>::push<boost::iostreams::basic_bzip2_decompressor<std::allocator<char>>>(const T &,std::streamsize,std::streamsize,void *)' being compiled 1> with 1> [ 1> Self=boost::iostreams::chain<boost::iostreams::input_seekable,char,std::char_traits<char>,std::allocator<char>> 1> , T=boost::iostreams::basic_bzip2_decompressor<std::allocator<char>> 1> ] 1>C:\Users\Efrain\Documents\CAMsoftware\trunk\thirdparty\boost\boost/iostreams/stream_buffer.hpp(68): error C2338: ( is_convertible< BOOST_DEDUCED_TYPENAME iostreams::category_of<T>::type, Mode >::value ) 1> C:\Users\Efrain\Documents\CAMsoftware\trunk\thirdparty\boost\boost/iostreams/chain.hpp(257) : see reference to class template instantiation 'boost::iostreams::stream_buffer<component_type,std::char_traits<char>,Alloc,Mode>' being compiled 1> with 1> [ 1> Alloc=std::allocator<char> 1> , Mode=boost::iostreams::input_seekable 1> ]