
On 4/7/2011 6:57 AM, Nathan Crookston wrote:
On Wed, Apr 6, 2011 at 4:42 PM, Steven Watanabe
wrote: I get errors too with 1.46.0. It looks like it's because transform_iterator doesn't use result_of. IIRC, this was fixed /very/ recently.
Phoenix v2 is tricky to use with transform due to result_of -- for one, there was the bug Steven mentioned with transform_iterator. For two, Phoenix v2's return type deduction mechanism is different than that used by result_of. Phoenix v3 uses result_of and should then be interoperable with boost::adaptors::transformed. For the time being it may be better to use boost::bind in this case.
Not quite true. That's a common misconception. Phoenix v2 *does*
support result_of. It's just phoenix::function that does not support
it due to legacy code and backward compat.
As a matter of fact, I took Steven's code and changed the headers to
that of V2 and it compiles:
#include