Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost::Spirit problem
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2010-05-20 07:35:13


> I have a problem converting "const
> boost::phoenix::actor<boost::spirit::argument<0> >&" to int, anyone know
> how I can do it?, looking in the documentation seems it should work as it
> is, but it does not ..., any idea?

Don't mix Phoenix expressions (and qi::_1 is a Phoenix placeholder) with boost::bind. Write

   phoenix::bind(&ActionHandler::addKeyValue,
       phoenix::ref(handler), qi::_1, phoenix::val("Test"))

instead and it will work (you need to include the proper Phoenix headers, though).

Regards Hartmut

---------------
Meet me at BoostCon
www.boostcon.com


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net