Boost C++ Libraries: Ticket #1528: g++ 4.3.0 reports error because of redeclaration of next https://svn.boost.org/trac10/ticket/1528 <p> Compiling parts of Fusion shows the following bug in MPL with a recent g++ 4.3 snapshot: </p> <p> In file included from /home/jens/trunk/boost/fusion/view/zip_view/detail/equal_to_impl.hpp:16, from /home/jens/trunk/boost/fusion/view/zip_view/zip_view_iterator.hpp:19, from /home/jens/trunk/boost/fusion/view/zip_view.hpp:12, from /home/jens/trunk/boost/fusion/include/zip_view.hpp:10, from /tmp/testDTdYXq.cpp:1: /home/jens/trunk/boost/mpl/zip_view.hpp:42: error: declaration of 'typedef struct boost::mpl::zip_iterator&lt;typename boost::mpl::transform1&lt;<a class="missing wiki">IteratorSeq</a>, boost::mpl::next&lt;mpl_::arg&lt;1&gt; &gt;, mpl_::na&gt;::type&gt; boost::mpl::zip_iterator&lt;<a class="missing wiki">IteratorSeq</a>&gt;::next' /home/jens/trunk/boost/mpl/next_prior.hpp:30: error: changes meaning of 'next' from 'struct boost::mpl::next&lt;mpl_::arg&lt;1&gt; &gt;' /home/jens/trunk/boost/mpl/zip_view.hpp:56: error: declaration of 'typedef struct boost::mpl::zip_iterator&lt;typename boost::mpl::transform1&lt;Sequences, boost::mpl::begin&lt;mpl_::arg&lt;1&gt; &gt;, mpl_::na&gt;::type&gt; boost::mpl::zip_view&lt;Sequences&gt;::begin' /home/jens/trunk/boost/mpl/begin_end.hpp:32: error: changes meaning of 'begin' from 'struct boost::mpl::begin&lt;mpl_::arg&lt;1&gt; &gt;' /home/jens/trunk/boost/mpl/zip_view.hpp:57: error: declaration of 'typedef struct boost::mpl::zip_iterator&lt;typename boost::mpl::transform1&lt;Sequences, boost::mpl::end&lt;mpl_::arg&lt;1&gt; &gt;, mpl_::na&gt;::type&gt; boost::mpl::zip_view&lt;Sequences&gt;::end' /home/jens/trunk/boost/mpl/begin_end.hpp:44: error: changes meaning of 'end' from 'struct boost::mpl::end&lt;mpl_::arg&lt;1&gt; &gt;' </p> <p> I think the problem is that in boost::mpl::zip_iterator boost::mpl::next is visible and does not allow to define a new next (even if relative to zip_iterator). </p> <p> See <a class="ext-link" href="http://en.opensuse.org/GCC_4.3_Transition"><span class="icon">​</span>http://en.opensuse.org/GCC_4.3_Transition</a> and <a class="ext-link" href="http://gcc.gnu.org/ml/gcc/2007-09/msg00480.html"><span class="icon">​</span>http://gcc.gnu.org/ml/gcc/2007-09/msg00480.html</a> for more details. </p> <p> Just renaming one of the "next" fixes this problem but introduces of course many more. </p> <p> PS: Please fix the typo "shorcuts" in one of the MPL header file. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1528 Trac 1.4.3 tim blechmann <tim@…> Sat, 02 Feb 2008 16:16:32 GMT attachment set https://svn.boost.org/trac10/ticket/1528 https://svn.boost.org/trac10/ticket/1528 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">0001-mpl-g-4.3-fix.patch</span> </li> </ul> <p> compile fix for g++-4.3 </p> Ticket bcs26@… Wed, 04 Jun 2008 21:48:48 GMT <link>https://svn.boost.org/trac10/ticket/1528#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1528#comment:1</guid> <description> <p> I can confirm that Tim's attached changes fix this issue for me under gcc-4.3 and boost-1.35. </p> </description> <category>Ticket</category> </item> <item> <author>bcs26@…</author> <pubDate>Wed, 04 Jun 2008 21:50:37 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/1528 https://svn.boost.org/trac10/ticket/1528 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">zip_view.cc</span> </li> </ul> <p> simple failing test case </p> Ticket Aleksey Gurtovoy Mon, 23 Jun 2008 02:33:42 GMT status changed https://svn.boost.org/trac10/ticket/1528#comment:2 https://svn.boost.org/trac10/ticket/1528#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Fixed in the trunk (<a class="changeset" href="https://svn.boost.org/trac10/changeset/46620" title="Fix redeclaration errors detected by GCC 4.3.0 (ticket #1528)">changeset:46620</a>), to be integrated in the release branch. </p> <p> Thanks for the patch! </p> Ticket Steven Robbins <smr@…> Sat, 16 Aug 2008 21:55:22 GMT <link>https://svn.boost.org/trac10/ticket/1528#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1528#comment:3</guid> <description> <p> Since the patch is applied, I believe this ticket should be closed. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Aleksey Gurtovoy</dc:creator> <pubDate>Sat, 11 Oct 2008 06:58:30 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/1528#comment:4 https://svn.boost.org/trac10/ticket/1528#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Merged into release branch as a part of the <a class="changeset" href="https://svn.boost.org/trac10/changeset/47650" title="Merge in critical bug fixes from the trunk (r46570, 46546 and 46620)">changeset:47650</a> </p> Ticket