9 Jul
2012
9 Jul
'12
9:49 p.m.
On Mon, Jul 9, 2012 at 2:40 PM, Nathan Ridge
//2. Works and looks clean but has the iterator range as part of the call. std::for_each(tokens.begin(), tokens.end(), phx::push_back(phx::ref(string_tokens), phx::arg_names::arg1));
Using the Boost.Range library, that would be:
boost::for_each(tokens, phx::push_back(phx::ref(string_tokens), phx::arg_names::arg1));
I think that's about as clean as you can get.
That looks great. Any idea what concept I'm not understand in which Phoenix for_each and push_back can't be used together without the lambda? Ryan