Boost logo

Boost Users :

From: Joel de Guzman (joel_at_[hidden])
Date: 2007-01-04 17:31:15


Hubert Hoover wrote:
> For the record - I figured out my problem, which was a bit
> of confusion about what was an actor and how to access closure members.
> The "ref" passed in is a phoenix::actor, NOT the closure member itself,
> so to access the closure member, the operator()() of the actor needs
> to be invoked - substituting into the do_appender::act below:
>
> String& value(ref());
> value += val;
>
> Of course, if act is called with something other than an actor, THIS
> will
> break, but I'm thinking it should ONLY be fed actors... And for my
> purposes,
> only an actor that returns a std::string&.

That's good to hear. To be honest, I had a difficult time trying to
read the code in your post. In the future, it's always a good idea
to attach a minimal cpp file that we can try without much fuss.

Regards,

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

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