Boost logo

Boost :

Subject: Re: [boost] [spirit][phoenix] Spirit v2 conflicts with Phoenix v3
From: Thomas Heller (thom.heller_at_[hidden])
Date: 2012-07-20 00:57:34


On Thursday, July 19, 2012 20:31:24 Andrey Semashev wrote:
> On Thursday 19 July 2012 16:49:03 Thomas Heller wrote:
> > You should define BOOST_SPIRIT_USE_PHOENIX_V3 instead...
>
> Sorry, I didn't go much further. Now it breaks in the following code:
>
> bool parse_counter_placeholder(path_string_type::const_iterator& it,
> path_string_type::const_iterator end, unsigned int& width)
> {
> return qi::parse
> (
> it, end,
> (
> qi::uint_[phoenix::ref(width) = qi::_1_type()]
> )
> );
> }

A minimal, self contained testcase we can try would be most helpful!

>
> The error is:
>
> In file included from ./boost/phoenix/core/actor.hpp:19:0,
> from ./boost/phoenix/core.hpp:15,
> from libs/log/src/text_file_backend.cpp:50:
> ./boost/phoenix/core/is_nullary.hpp: In instantiation of
> ‘boost::phoenix::result_of::is_nullary<boost::proto::exprns_::basic_expr<boo
> st::proto::tagns_::tag::assign,
> boost::proto::argsns_::list2<boost::proto::exprns_::basic_expr<boost::proto
> ::tagns_::tag::terminal,
> boost::proto::argsns_::term<boost::reference_wrapper<unsigned int> >, 0l>,
> boost::phoenix::actor<boost::spirit::argument<0> > >, 2l>, void>’:
> ./boost/phoenix/core/detail/preprocessed/actor_result_of_10.hpp:38:13:
> instantiated from
> ‘boost::phoenix::result_of::actor<boost::proto::exprns_::basic_expr<boost::p
> roto::tagns_::tag::assign,
> boost::proto::argsns_::list2<boost::proto::exprns_::basic_expr<boost::proto
> ::tagns_::tag::terminal,
> boost::proto::argsns_::term<boost::reference_wrapper<unsigned int> >, 0l>,
> boost::phoenix::actor<boost::spirit::argument<0> > >, 2l>, void, void,
> void, void, void, void, void, void, void, void, void>’
> ./boost/phoenix/core/actor.hpp:240:9: instantiated from
> ‘boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns
> _::tag::assign,
> boost::proto::argsns_::list2<boost::proto::exprns_::basic_expr<boost::proto
> ::tagns_::tag::terminal,
> boost::proto::argsns_::term<boost::reference_wrapper<unsigned int> >, 0l>,
> boost::phoenix::actor<boost::spirit::argument<0> > >, 2l> >’
> libs/log/src/text_file_backend.cpp:335:67: instantiated from here
> ./boost/phoenix/core/is_nullary.hpp:115:16: error: base type
> ‘boost::phoenix::evaluator::impl<const
> boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::assign,
> boost::proto::argsns_::list2<boost::proto::exprns_::basic_expr<boost::proto:
> :tagns_::tag::terminal,
> boost::proto::argsns_::term<boost::reference_wrapper<unsigned int> >, 0l>,
> boost::phoenix::actor<boost::spirit::argument<0> > >, 2l>&,
> boost::phoenix::vector2<mpl_::bool_<true>, boost::phoenix::is_nullary>,
> int>::result_type {aka const
> boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::assign,
> boost::proto::argsns_::list2<boost::proto::exprns_::basic_expr<boost::proto:
> :tagns_::tag::terminal,
> boost::proto::argsns_::term<boost::reference_wrapper<unsigned int> >, 0l>,
> boost::phoenix::actor<boost::spirit::argument<0> > >, 2l>&}’ fails to be a
> struct or class type
>
> path_string_type is a flavour of std::basic_string. The code looks pretty
> much like what is in Boost.Spirit docs. Am I doing something wrong?
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk