Boost logo

Boost Users :

Subject: Re: [Boost-users] [Spirit.Qi] I want to modify _val, how?
From: Christoph Duelli (duelli_at_[hidden])
Date: 2009-11-23 04:55:30


HT4N - wrote:

>
> So, I was able to modify _1 (type of struct ptnode) by using a functor()
> (e.g. [_val = func(x, _1)] where the function will take a reference of _1
> and do some modification to it and return (typeof(_1)&).
>
> Can we also modify _val placeholder on the fly through semantic action?
> i.e. once _val = _1 executed, then modify the _val object
sure, i.e.
arule[ _val=..., phx::bind(&someFunc, _val, ...)]

No problem at all.


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