Subject: [Boost-bugs] [Boost C++ Libraries] #2234: Spirit2/Phoenix compilation error (front on iterator_range)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-08-20 13:06:44
#2234: Spirit2/Phoenix compilation error (front on iterator_range)
------------------------------------------------------------------------+---
Reporter: François Barel <frabar666_at_[hidden]> | Owner: djowel
Type: Bugs | Status: new
Milestone: Boost 1.37.0 | Component: spirit
Version: Boost 1.36.0 | Severity: Regression
Keywords: spirit phoenix action attribute const front iterator_range |
------------------------------------------------------------------------+---
The following source:
{{{
#include <boost/spirit/include/qi.hpp>
using namespace ::boost::spirit;
using namespace ::boost::spirit::qi;
using namespace ::boost::spirit::arg_names;
#include <boost/spirit/include/phoenix_stl.hpp>
using namespace ::boost::phoenix;
int main()
{
rule< const wchar_t* > r;
r = raw[ wchar ][ front(_1) ];
return 0;
}
}}}
worked several months ago (before Spirit2 was brought in Boost svn), but
no longer compiles with current svn-trunk, gcc gives the following error:
{{{
.../boost/spirit/home/phoenix/stl/container/detail/container.hpp:42:
error: no type named âconst_referenceâ
in âconst class boost::iterator_range<const wchar_t*>â
}}}
[[BR]]
It seems due to r44555 which made attributes const in actions, as
{{{boost::iterator_range}}} does not contain a {{{const_reference}}}
typedef.
Note that replacing {{{front}}} with {{{*begin}}} works around the
problem, since {{{boost::iterator_range}}} does contain a
{{{const_iterator}}} typedef.
[[BR]]
I don't know enough about {{{iterator_range}}} and Phoenix type deduction
to know in which one this should be fixed... please tell me if I should
submit a feature request ticket to add a {{{const_reference}}} typedef to
{{{iterator_range}}}.
-- Ticket URL: <http://svn.boost.org/trac/boost/ticket/2234> 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:58 UTC