Boost C++ Libraries: Ticket #5097: Boost Fusion fails to compile with transform or mpl headers included https://svn.boost.org/trac10/ticket/5097 <p> Fusion fails to compile as soon as the transform.hpp or mpl.hpp headers are included. </p> <pre class="wiki">// // Compile command: g++ test.cpp // Boost 1.45.0 // gcc -v produces: // Using built-in specs. // Target: i686-linux-gnu // Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu // Thread model: posix // gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) // // Including any of the following 3 headers, or any permutation causes the error #include &lt;boost/fusion/algorithm/transformation/transform.hpp&gt; #include &lt;boost/fusion/include/transform.hpp&gt; #include &lt;boost/fusion/include/mpl.hpp&gt; int main() { return 0; } </pre><p> Error message is the same regardless of the combination of headers: </p> <pre class="wiki">In file included from /usr/local/include/boost/fusion/view/joint_view/joint_view.hpp:15, from /usr/local/include/boost/fusion/algorithm/transformation/erase.hpp:13, from /usr/local/include/boost/fusion/mpl/erase.hpp:12, from /usr/local/include/boost/fusion/mpl.hpp:20, from /usr/local/include/boost/fusion/include/mpl.hpp:11, from test.cpp:15: /usr/local/include/boost/fusion/view/joint_view/joint_view_iterator.hpp:28: error: redeclared with 4 template parameter(s) /usr/local/include/boost/fusion/view/joint_view/detail/next_impl.hpp:19: note: previous declaration ‘template&lt;class First, class Last, class Concat&gt; struct boost::fusion::joint_view_iterator’ used 3 template parameter(s) /usr/local/include/boost/fusion/view/joint_view/joint_view_iterator.hpp:29: error: wrong number of template arguments (4, should be 3) /usr/local/include/boost/fusion/view/joint_view/detail/next_impl.hpp:19: error: provided for ‘template&lt;class First, class Last, class Concat&gt; struct boost::fusion::joint_view_iterator’ /usr/local/include/boost/fusion/view/joint_view/joint_view_iterator.hpp:29: error: template argument 1 is invalid </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5097 Trac 1.4.3 Christopher Schmidt Thu, 20 Jan 2011 23:43:07 GMT <link>https://svn.boost.org/trac10/ticket/5097#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5097#comment:1</guid> <description> <p> Your code compiles fine here (boost 1.45, gcc 4.5.1). What's interesting is that you got a declaration of joint_view_iterator in next_impl.hpp:19 with 3 template type parameters, whereas the 1.45's next_impl.hpp:19 implements a declaration with 4 template type parameters. </p> <p> <a class="ext-link" href="https://github.com/ryppl/boost-svn/blob/2c676182ae36bbb8a33ff3da0a7a0b7cd97f0eae/boost/fusion/view/joint_view/detail/next_impl.hpp"><span class="icon">​</span>https://github.com/ryppl/boost-svn/blob/2c676182ae36bbb8a33ff3da0a7a0b7cd97f0eae/boost/fusion/view/joint_view/detail/next_impl.hpp</a> </p> </description> <category>Ticket</category> </item> <item> <author>vivek@…</author> <pubDate>Fri, 21 Jan 2011 03:30:03 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/5097 https://svn.boost.org/trac10/ticket/5097 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">next_impl_vs.hpp</span> </li> </ul> <p> An old version of next_impl.hpp that seems to have been installed with boost 1.45.0 </p> Ticket vivek@… Fri, 21 Jan 2011 03:37:52 GMT <link>https://svn.boost.org/trac10/ticket/5097#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5097#comment:2</guid> <description> <p> I looked at my /usr/local/include/boost/fusion/view/joint_view/detail/next_impl.hpp file, and the joint_view_iterator template contains 3, not 4, arguments. Attached is that version of the file as <code>next_impl_vs.hpp</code>. I verified that I had indeed installed 1.45.0 by looking at boost/version.hpp. </p> <p> Anyway, a complete boost re-install from a fresh archive from sourceforge did the trick. Might there have been a defective 1.45.0 archive up there in the past? </p> </description> <category>Ticket</category> </item> <item> <author>vivek@…</author> <pubDate>Fri, 21 Jan 2011 03:38:25 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/5097#comment:3 https://svn.boost.org/trac10/ticket/5097#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">worksforme</span> </li> </ul> Ticket