
Just updated from mainline cvs. Then even range.hpp by itself will not compile: g++34 -x c++ -fsyntax-only -I /usr/local/src/boost.cvs /usr/local/src/boost.cvs/boost/range.hpp In file included from /usr/local/src/boost.cvs/boost/range.hpp:21: /usr/local/src/boost.cvs/boost/range/sub_range.hpp:66: error: `iterator' does not name a type /usr/local/src/boost.cvs/boost/range/sub_range.hpp:66: error: (perhaps `typename boost::iterator_range<typename boost::result_iterator_of<C>::type>::iterator' was intended) /usr/local/src/boost.cvs/boost/range/sub_range.hpp:68: error: `iterator' does not name a type /usr/local/src/boost.cvs/boost/range/sub_range.hpp:68: error: (perhaps `typename boost::iterator_range<typename boost::result_iterator_of<C>::type>::iterator' was intended)

Neal Becker wrote:
Just updated from mainline cvs. Then even range.hpp by itself will not compile:
g++34 -x c++ -fsyntax-only -I /usr/local/src/boost.cvs /usr/local/src/boost.cvs/boost/range.hpp In file included from /usr/local/src/boost.cvs/boost/range.hpp:21: /usr/local/src/boost.cvs/boost/range/sub_range.hpp:66: error: `iterator' does not name a type /usr/local/src/boost.cvs/boost/range/sub_range.hpp:66: error: (perhaps `typename boost::iterator_range<typename boost::result_iterator_of<C>::type>::iterator' was intended) /usr/local/src/boost.cvs/boost/range/sub_range.hpp:68: error: `iterator' does not name a type /usr/local/src/boost.cvs/boost/range/sub_range.hpp:68: error: (perhaps `typename boost::iterator_range<typename boost::result_iterator_of<C>::type>::iterator' was intended)
This patch seems to fix it:

Neal Becker wrote:
g++34 -x c++ -fsyntax-only -I /usr/local/src/boost.cvs /usr/local/src/boost.cvs/boost/range.hpp In file included from /usr/local/src/boost.cvs/boost/range.hpp:21: /usr/local/src/boost.cvs/boost/range/sub_range.hpp:66: error: `iterator' does not name a type /usr/local/src/boost.cvs/boost/range/sub_range.hpp:66: error: (perhaps `typename boost::iterator_range<typename boost::result_iterator_of<C>::type>::iterator' was intended) /usr/local/src/boost.cvs/boost/range/sub_range.hpp:68: error: `iterator' does not name a type /usr/local/src/boost.cvs/boost/range/sub_range.hpp:68: error: (perhaps `typename boost::iterator_range<typename boost::result_iterator_of<C>::type>::iterator' was intended)
This patch seems to fix it:
Yes, this workarounds a bug in GCC: using-declaration are still implemented following the old-style ARM access-declarations. This is true of every GCC version. In other words, there is no way GCC will remember that 'iterator' is a typename just because you said so in a using-declaration. -- Giovanni Bajo

"Neal Becker" <ndbecker2@verizon.net> wrote in message news:cfh94h$mju$1@sea.gmane.org... | Neal Becker wrote: | | > Just updated from mainline cvs. Then even range.hpp by itself will not | > compile: | This patch seems to fix it: Thanks for the patch! However, I think I will prefer something that works on all platforms; so I will just do typedef BOOST_DEDUCED_TYPENAME value_type_of<ForwardRange>::type value_type; typedef BOOST_DEDUCED_TYPENAME iterator_of<ForwardRange>::type iterator; br Thorsten
participants (3)
-
Giovanni Bajo
-
Neal Becker
-
Thorsten Ottosen