[Boost-bugs] [Boost C++ Libraries] #12218: Compilation error using input_seekable with gzip_decompressor()

Subject: [Boost-bugs] [Boost C++ Libraries] #12218: Compilation error using input_seekable with gzip_decompressor()
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-05-22 01:18:42


#12218: Compilation error using input_seekable with gzip_decompressor()
-------------------------+-------------------------------------------------
 Reporter: anonymous | Type: Support Requests
   Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.58.0
 Severity: Problem | Keywords: GZIP, BZIP decompressor, seekable
                         | device
-------------------------+-------------------------------------------------
 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> ]

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12218>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC