|
Boost : |
From: Francois Barel (frabar666_at_[hidden])
Date: 2008-08-21 13:59:54
Hi list,
boost::iterator_range currently contains both 'iterator' and
'reference' typedefs, and yet only a 'const_iterator' one (no
'const_reference').
This can be a problem with Spirit actions (compilation errors, see
trac ticket #2234 - http://svn.boost.org/trac/boost/ticket/2234).
After removing Spirit code, it boils down to:
////////////////////
#include <boost/spirit/include/phoenix_stl.hpp>
#include <boost/range/iterator_range.hpp>
int main()
{
typedef const boost::iterator_range< const char* > cir;
boost::phoenix::stl::front::result< cir > foo; // compilation error
return 0;
}
////////////////////
The problem comes from the instantiation of
boost::phoenix::stl::front::result< const iterator_range<...> >
which, since its template argument is const, accesses its
const_reference typedef -- which doesn't exist in iterator_range.
Does it make sense / is it possible to add a const_reference typedef
in iterator_range?
Thanks,
Francois
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk