Boost C++ Libraries: Ticket #12218: Compilation error using input_seekable with gzip_decompressor() https://svn.boost.org/trac10/ticket/12218 <p> Hello: </p> <p> 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. </p> <pre class="wiki">std::ifstream file("file.tgz"); boost::iostreams::filtering_streambuf&lt;boost::iostreams::input_seekable&gt; in; in.push(boost::iostreams::gzip_decompressor());// here the error C2338, if I comment this line the error is gone in.push(file); </pre><p> C:\Users\Efrain\Documents\CAMsoftware\trunk\thirdparty\boost\boost/iostreams/chain.hpp(244): error C2338: (is_convertible&lt;category, Mode&gt;::value) 1&gt; 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&lt;boost::iostreams::chain&lt;Mode,Ch,Tr,Alloc&gt;,Ch,Tr,Alloc,Mode&gt;::push_impl&lt;T&gt;(const T &amp;,std::streamsize,std::streamsize)' being compiled 1&gt; with 1&gt; [ 1&gt; Mode=boost::iostreams::input_seekable 1&gt; , Ch=char 1&gt; , Tr=std::char_traits&lt;char&gt; 1&gt; , Alloc=std::allocator&lt;char&gt; 1&gt; , T=boost::iostreams::basic_bzip2_decompressor&lt;std::allocator&lt;char&gt;&gt; 1&gt; ] 1&gt; 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&lt;boost::iostreams::chain&lt;Mode,Ch,Tr,Alloc&gt;,Ch,Tr,Alloc,Mode&gt;::push_impl&lt;T&gt;(const T &amp;,std::streamsize,std::streamsize)' being compiled 1&gt; with 1&gt; [ 1&gt; Mode=boost::iostreams::input_seekable 1&gt; , Ch=char 1&gt; , Tr=std::char_traits&lt;char&gt; 1&gt; , Alloc=std::allocator&lt;char&gt; 1&gt; , T=boost::iostreams::basic_bzip2_decompressor&lt;std::allocator&lt;char&gt;&gt; 1&gt; ] 1&gt; 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&lt;boost::iostreams::chain&lt;Mode,Ch,Tr,Alloc&gt;,Ch,Tr,Alloc,Mode&gt;::push&lt;T&gt;(const T &amp;,std::streamsize,std::streamsize,void *)' being compiled 1&gt; with 1&gt; [ 1&gt; Mode=boost::iostreams::input_seekable 1&gt; , Ch=char 1&gt; , Tr=std::char_traits&lt;char&gt; 1&gt; , Alloc=std::allocator&lt;char&gt; 1&gt; , T=boost::iostreams::basic_bzip2_decompressor&lt;std::allocator&lt;char&gt;&gt; 1&gt; ] 1&gt; 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&lt;boost::iostreams::chain&lt;Mode,Ch,Tr,Alloc&gt;,Ch,Tr,Alloc,Mode&gt;::push&lt;T&gt;(const T &amp;,std::streamsize,std::streamsize,void *)' being compiled 1&gt; with 1&gt; [ 1&gt; Mode=boost::iostreams::input_seekable 1&gt; , Ch=char 1&gt; , Tr=std::char_traits&lt;char&gt; 1&gt; , Alloc=std::allocator&lt;char&gt; 1&gt; , T=boost::iostreams::basic_bzip2_decompressor&lt;std::allocator&lt;char&gt;&gt; 1&gt; ] 1&gt; 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&lt;Self&gt;::push_impl&lt;T&gt;(const T &amp;,std::streamsize,std::streamsize)' being compiled 1&gt; with 1&gt; [ 1&gt; Self=boost::iostreams::chain&lt;boost::iostreams::input_seekable,char,std::char_traits&lt;char&gt;,std::allocator&lt;char&gt;&gt; 1&gt; , T=boost::iostreams::basic_bzip2_decompressor&lt;std::allocator&lt;char&gt;&gt; 1&gt; ] 1&gt; 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&lt;Self&gt;::push_impl&lt;T&gt;(const T &amp;,std::streamsize,std::streamsize)' being compiled 1&gt; with 1&gt; [ 1&gt; Self=boost::iostreams::chain&lt;boost::iostreams::input_seekable,char,std::char_traits&lt;char&gt;,std::allocator&lt;char&gt;&gt; 1&gt; , T=boost::iostreams::basic_bzip2_decompressor&lt;std::allocator&lt;char&gt;&gt; 1&gt; ] 1&gt; source\c_archive.cpp(60) : see reference to function template instantiation 'void boost::iostreams::detail::chain_client&lt;Self&gt;::push&lt;boost::iostreams::basic_bzip2_decompressor&lt;std::allocator&lt;char&gt;&gt;&gt;(const T &amp;,std::streamsize,std::streamsize,void *)' being compiled 1&gt; with 1&gt; [ 1&gt; Self=boost::iostreams::chain&lt;boost::iostreams::input_seekable,char,std::char_traits&lt;char&gt;,std::allocator&lt;char&gt;&gt; 1&gt; , T=boost::iostreams::basic_bzip2_decompressor&lt;std::allocator&lt;char&gt;&gt; 1&gt; ] 1&gt; source\c_archive.cpp(60) : see reference to function template instantiation 'void boost::iostreams::detail::chain_client&lt;Self&gt;::push&lt;boost::iostreams::basic_bzip2_decompressor&lt;std::allocator&lt;char&gt;&gt;&gt;(const T &amp;,std::streamsize,std::streamsize,void *)' being compiled 1&gt; with 1&gt; [ 1&gt; Self=boost::iostreams::chain&lt;boost::iostreams::input_seekable,char,std::char_traits&lt;char&gt;,std::allocator&lt;char&gt;&gt; 1&gt; , T=boost::iostreams::basic_bzip2_decompressor&lt;std::allocator&lt;char&gt;&gt; 1&gt; ] 1&gt;C:\Users\Efrain\Documents\CAMsoftware\trunk\thirdparty\boost\boost/iostreams/stream_buffer.hpp(68): error C2338: ( is_convertible&lt; BOOST_DEDUCED_TYPENAME iostreams::category_of&lt;T&gt;::type, Mode &gt;::value ) 1&gt; C:\Users\Efrain\Documents\CAMsoftware\trunk\thirdparty\boost\boost/iostreams/chain.hpp(257) : see reference to class template instantiation 'boost::iostreams::stream_buffer&lt;component_type,std::char_traits&lt;char&gt;,Alloc,Mode&gt;' being compiled 1&gt; with 1&gt; [ 1&gt; Alloc=std::allocator&lt;char&gt; 1&gt; , Mode=boost::iostreams::input_seekable 1&gt; ] }}} </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12218 Trac 1.4.3 viboes Fri, 19 Aug 2016 21:21:40 GMT component, description changed; owner set https://svn.boost.org/trac10/ticket/12218#comment:1 https://svn.boost.org/trac10/ticket/12218#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Jonathan Turkanis</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">iostreams</span> </li> <li><strong>description</strong> modified (<a href="/trac10/ticket/12218?action=diff&amp;version=1">diff</a>) </li> </ul> Ticket