[Boost-bugs] [Boost C++ Libraries] #1528: g++ 4.3.0 reports error because of redeclaration of next

Subject: [Boost-bugs] [Boost C++ Libraries] #1528: g++ 4.3.0 reports error because of redeclaration of next
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-12-19 15:28:34


#1528: g++ 4.3.0 reports error because of redeclaration of next
-------------------------------------+--------------------------------------
 Reporter: jensseidel_at_[hidden] | Owner: agurtovoy
     Type: Bugs | Status: new
Milestone: Boost 1.35.0 | Component: mpl
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-------------------------------------+--------------------------------------
 Compiling parts of Fusion shows the following bug in MPL with a recent g++
 4.3 snapshot:

 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<typename
 boost::mpl::transform1<IteratorSeq, boost::mpl::next<mpl_::arg<1> >,
 mpl_::na>::type> boost::mpl::zip_iterator<IteratorSeq>::next'
 /home/jens/trunk/boost/mpl/next_prior.hpp:30: error: changes meaning of
 'next' from 'struct boost::mpl::next<mpl_::arg<1> >'
 /home/jens/trunk/boost/mpl/zip_view.hpp:56: error: declaration of 'typedef
 struct boost::mpl::zip_iterator<typename boost::mpl::transform1<Sequences,
 boost::mpl::begin<mpl_::arg<1> >, mpl_::na>::type>
 boost::mpl::zip_view<Sequences>::begin'
 /home/jens/trunk/boost/mpl/begin_end.hpp:32: error: changes meaning of
 'begin' from 'struct boost::mpl::begin<mpl_::arg<1> >'
 /home/jens/trunk/boost/mpl/zip_view.hpp:57: error: declaration of 'typedef
 struct boost::mpl::zip_iterator<typename boost::mpl::transform1<Sequences,
 boost::mpl::end<mpl_::arg<1> >, mpl_::na>::type>
 boost::mpl::zip_view<Sequences>::end'
 /home/jens/trunk/boost/mpl/begin_end.hpp:44: error: changes meaning of
 'end' from 'struct boost::mpl::end<mpl_::arg<1> >'

 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).

 See http://en.opensuse.org/GCC_4.3_Transition and
 http://gcc.gnu.org/ml/gcc/2007-09/msg00480.html for more details.

 Just renaming one of the "next" fixes this problem but introduces of
 course many more.

 PS: Please fix the typo "shorcuts" in one of the MPL header file.

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1528>
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:49:57 UTC