|
Boost Users : |
Subject: Re: [Boost-users] [Phoenix] for_each calling push_back for stl containers
From: Joel de Guzman (joel_at_[hidden])
Date: 2012-07-10 22:02:16
On 7/11/2012 2:11 AM, Ryan wrote:
> I didn't mean to sound harsh. I gave a gut reaction about the needed syntax to accomplish
> what I considered a simple task. I apologize if it sounded like an attack on the library.
> That was not my intent. I really do appreciate all the hard work that goes into these
> libraries.
No worries, Ryan. Don't take me too seriously ;-) I'm half joking, you know.
> Thank you for simplifying it even further. I tried it and it compiles and works. I did
> tried and reduce it even further.
>
> for_each( ref(tokens),
> lambda
> [
> push_back(ref(string_tokens), _1)
> ]
> )
>
> This compiled but didn't work as intended. Why is push_back able take a reference to
> string_tokens but for_each isn't able to take a reference to tokens?
Hmm, I can never tell unless I see a minimal cpp file I can try.
Regards,
-- Joel de Guzman http://www.boostpro.com http://boost-spirit.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