Boost C++ Libraries: Ticket #11572: The generic fusion sequence convert to a deque fails with a compiler error https://svn.boost.org/trac10/ticket/11572 <p> The following code, as deque_convert.cpp, which uses the generic boost::fusion::convert to convert to a boost::fusion::deque, fails with a compiler error: </p> <pre class="wiki"> #include &lt;boost/detail/lightweight_test.hpp&gt; #include &lt;boost/fusion/include/deque.hpp&gt; #include &lt;boost/fusion/include/make_deque.hpp&gt; #include &lt;boost/fusion/include/make_vector.hpp&gt; #include &lt;boost/fusion/sequence/intrinsic/at_c.hpp&gt; #include &lt;boost/fusion/sequence/convert.hpp&gt; #include &lt;string&gt; int main() { boost::fusion::deque&lt;int, std::string&gt; t = boost::fusion::convert&lt;boost::fusion::deque_tag&gt;(boost::fusion::make_vector(123, "Hola!!!")); // Line 13 // boost::fusion::deque&lt;int, std::string&gt; t = boost::fusion::convert&lt;boost::fusion::deque_tag&gt;(boost::fusion::make_deque(123, "Hola!!!")); // Line 14 BOOST_TEST(boost::fusion::at_c&lt;0&gt;(t) == 123); BOOST_TEST(boost::fusion::at_c&lt;1&gt;(t) == "Hola!!!"); return boost::report_errors(); } </pre><p> Compiling with mingw-64/gcc-5.1 on Windows: </p> <pre class="wiki"> "C:/Utilities/mingw-w64/i686-5.1.0-posix-dwarf-rt_v4-rev0/mingw32/bin/g++" -ftemplate-depth-128 -Wno-unused-local-typedefs -ftrack-macro-expansion=0 -O0 -fno-inline -Wall -g -march=i686 -m32 -DBOOST_ALL_NO_LIB=1 -I"..\..\.." -c -o "..\..\..\bin.v2\libs\fusion\test\deque_convert.test\gcc-mingw-5.1\debug\sequence\deque_convert.o" "sequence\deque_convert.cpp" In file included from ..\..\../boost/fusion/container/deque/convert.hpp:12:0, from ..\..\../boost/fusion/container/deque.hpp:14, from ..\..\../boost/fusion/include/deque.hpp:11, from sequence\deque_convert.cpp:2: ..\..\../boost/fusion/container/deque/detail/convert_impl.hpp: In instantiation of 'static boost::fusion::extension::convert_impl&lt;boost::fusion::deque_tag&gt;::apply&lt;Sequence&gt;::type boost::fusion::extension::convert_impl&lt;boost::fusion::deque_tag&gt;::apply&lt;Sequence&gt;::call(Sequence&amp;) [with Sequence = const boost::fusion::vector2&lt;int, const char (&amp;)[8]&gt;; boost::fusion::extension::convert_impl&lt;boost::fusion::deque_tag&gt;::apply&lt;Sequence&gt;::type = boost::fusion::deque&lt;int, const char (&amp;)[8], boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_&gt;]': ..\..\../boost/fusion/sequence/convert.hpp:48:25: required from 'typename boost::fusion::result_of::convert&lt;Tag, const Sequence&gt;::type boost::fusion::convert(const Sequence&amp;) [with Tag = boost::fusion::deque_tag; Sequence = boost::fusion::vector2&lt;int, const char (&amp;)[8]&gt;; typename boost::fusion::result_of::convert&lt;Tag, const Sequence&gt;::type = boost::fusion::deque&lt;int, const char (&amp;)[8], boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_&gt;]' sequence\deque_convert.cpp:11:139: required from here ..\..\../boost/fusion/container/deque/detail/convert_impl.hpp:44:37: error: 'call' is not a member of 'boost::fusion::extension::convert_impl&lt;boost::fusion::deque_tag&gt;::apply&lt;const boost::fusion::vector2&lt;int, const char (&amp;)[8]&gt; &gt;::gen {aka boost::fusion::result_of::as_deque&lt;const boost::fusion::vector2&lt;int, const char (&amp;)[8]&gt; &gt;}' return gen::call(seq); </pre><p> Compiling with msvc-14.0 on Windows: </p> <pre class="wiki"> file ..\..\..\bin.v2\libs\fusion\test\deque_convert.test\msvc-14.0\debug\threading-multi\sequence\deque_convert.obj.rsp "sequence\deque_convert.cpp" -Fo"..\..\..\bin.v2\libs\fusion\test\deque_convert.test\msvc-14.0\debug\threading-multi\sequence\deque_convert.obj" -TP /Z7 /Od /Ob0 /W3 /GR /MDd /Zc:forScope /Zc:wchar_t /wd4675 /EHs -c -DBOOST_ALL_NO_LIB=1 "-I..\..\.." compile-c-c++ ..\..\..\bin.v2\libs\fusion\test\deque_convert.test\msvc-14.0\debug\threading-multi\sequence\deque_convert.obj call "C:\Users\eldiener\AppData\Local\Temp\b2_msvc_14.0_vcvarsall_x86.cmd" &gt;nul cl /Zm800 -nologo @"..\..\..\bin.v2\libs\fusion\test\deque_convert.test\msvc-14.0\debug\threading-multi\sequence\deque_convert.obj.rsp" deque_convert.cpp Unknown compiler version - please run the configure tests and report the results C:\Programming\VersionControl\modular-boost\boost/fusion/container/deque/detail/convert_impl.hpp(44): error C2039: 'call': is not a member of 'boost::fusion::result_of::as_deque&lt;Sequence&gt;' with [ Sequence=const boost::fusion::vector2&lt;int,const char (&amp;)[8]&gt; ] C:\Programming\VersionControl\modular-boost\boost/fusion/container/deque/detail/convert_impl.hpp(43): note: while compiling class template member function 'boost::fusion::deque&lt;int,const char (&amp;)[8],boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_&gt; boost::fusion::extension::convert_impl&lt;boost::fusion::deque_tag&gt;::apply&lt;Sequence&gt;::call(Sequence &amp;)' with [ Sequence=const boost::fusion::vector2&lt;int,const char (&amp;)[8]&gt; ] C:\Programming\VersionControl\modular-boost\boost/fusion/sequence/convert.hpp(48): note: see reference to function template instantiation 'boost::fusion::deque&lt;int,const char (&amp;)[8],boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_,boost::fusion::void_&gt; boost::fusion::extension::convert_impl&lt;boost::fusion::deque_tag&gt;::apply&lt;Sequence&gt;::call(Sequence &amp;)' being compiled with [ Sequence=const boost::fusion::vector2&lt;int,const char (&amp;)[8]&gt; ] C:\Programming\VersionControl\modular-boost\boost/fusion/sequence/convert.hpp(29): note: see reference to class template instantiation 'boost::fusion::extension::convert_impl&lt;boost::fusion::deque_tag&gt;::apply&lt;Sequence&gt;' being compiled with [ Sequence=const boost::fusion::vector2&lt;int,const char (&amp;)[8]&gt; ] sequence\deque_convert.cpp(11): note: see reference to class template instantiation 'boost::fusion::result_of::convert&lt;boost::fusion::deque_tag,const boost::fusion::vector2&lt;T,const char (&amp;)[8]&gt;&gt;' being compiled with [ T=int ] </pre><p> Compiling with clang-3.8: </p> <pre class="wiki"> "C:/Programming/VersionControl/bninja_installed_clang/bin/clang++" -c -x c++ -D__MINGW_FORCE_SYS_INTRINS -Wno-unused-local-typedef -Wno-dll-attribute-on-redeclaration -O0 -g -fno-inline -Wall -g -march=i686 -m32 -DBOOST_ALL_NO_LIB=1 -I"..\..\.." -o "..\..\..\bin.v2\libs\fusion\test\deque_convert.test\clang-linux-3.8\debug\sequence\deque_convert.obj" "sequence\deque_convert.cpp" In file included from sequence\deque_convert.cpp:2: In file included from ..\..\..\boost/fusion/include/deque.hpp:11: In file included from ..\..\..\boost/fusion/container/deque.hpp:14: In file included from ..\..\..\boost/fusion/container/deque/convert.hpp:12: ..\..\..\boost/fusion/container/deque/detail/convert_impl.hpp:44:33: error: no member named 'call' in 'boost::fusion::result_of::as_deque&lt;const boost::fusion::vector2&lt;int, char const (&amp;)[8]&gt; &gt;' return gen::call(seq); ~~~~~^ ..\..\..\boost/fusion/sequence/convert.hpp:48:21: note: in instantiation of member function 'boost::fusion::extension::convert_impl&lt;boost::fusion::deque_tag&gt;::apply&lt;const boost::fusion::vector2&lt;int, char const (&amp;)[8]&gt; &gt;::call' requested here return gen::call(seq); ^ sequence\deque_convert.cpp:11:63: note: in instantiation of function template specialization 'boost::fusion::convert&lt;boost::fusion::deque_tag, boost::fusion::vector2&lt;int, char const (&amp;)[8]&gt; &gt;' requested here boost::fusion::deque&lt;int, std::string&gt; t = boost::fusion::convert&lt;boost::fusion::deque_tag&gt;(boost::fusion::make_vector(123, "Hola!!!")); // Line 13 </pre><p> In the source file commenting out line 13 and uncommenting line 14 produces the same error. I do not believe any conversion to a boost::fusion::deque, using the generic boost::fusion::convert functionality, will work. </p> <p> I discovered this bug testing out a PR for the iterator library where a suggested change has been implemented so that the zip_iterator in the iterator library can use fusion sequences, and through the fusion adapter, std::tuple, as the tuple type for the tupleiterator of a zip_iterator. </p> <p> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11572 Trac 1.4.3 Edward Diener Mon, 24 Aug 2015 00:17:42 GMT description changed https://svn.boost.org/trac10/ticket/11572#comment:1 https://svn.boost.org/trac10/ticket/11572#comment:1 <ul> <li><strong>description</strong> modified (<a href="/trac10/ticket/11572?action=diff&amp;version=1">diff</a>) </li> </ul> Ticket Kohei Takahashi <flast@…> Tue, 25 Aug 2015 15:28:01 GMT milestone changed https://svn.boost.org/trac10/ticket/11572#comment:2 https://svn.boost.org/trac10/ticket/11572#comment:2 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.60.0</span> </li> </ul> <p> It should be fixed by <a class="ext-link" href="https://github.com/boostorg/fusion/pull/99"><span class="icon">​</span>https://github.com/boostorg/fusion/pull/99</a>. </p> Ticket Joel de Guzman Tue, 25 Aug 2015 22:01:41 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11572#comment:3 https://svn.boost.org/trac10/ticket/11572#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket James E. King, III Mon, 04 Sep 2017 23:35:21 GMT <link>https://svn.boost.org/trac10/ticket/11572#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11572#comment:4</guid> <description> <p> Unfortunate boostorg/iterator does not have "issues" enabled so I could not report it there, but boost iterator test jamfile.v2 has a commented out line referencing this fix, and now that this is fixed, that line should be uncommented. </p> </description> <category>Ticket</category> </item> </channel> </rss>