|
Boost Users : |
Subject: Re: [Boost-users] Boost Phoenix & language lambdas
From: stephane GULLAUD (stephane.gullaud_at_[hidden])
Date: 2015-05-16 03:03:04
I think where boost.Phoenix still bas added value, beside only syntax
difference, is for polymorphic lambda . This is espacially usefull if you
are using Phoenix in conjunction with boost.fusion for instance.
Stephane.
Le ven. 15 mai 2015 14:18, Krzysztof Czainski <1czajnik_at_[hidden]> a écrit :
> 2015-05-15 12:07 GMT+02:00 Robert Jones <robertgbjones_at_[hidden]>:
>
>> I'm sure this has been asked before, and apologies in advance to the
>> programming gods of Boost.Phoenix, but has Phoenix effectively been
>> replaced by language lambdas, or are there still things for which Phoenix
>> is the best answer?
>>
>> Thx, Rob.
>>
>
> A pair of super-simple example:
>
> boost::for_each(v, _1 = _1 * _1);
> boost::for_each(v, [](auto& x) { x = x * x; });
>
> boost::transform(v, out, _1 * _1);
> boost::transform(v, out, [](auto& x) { return x * x; });
>
> My choice for these super-simple examples: Phoenix.
>
> And Phoenix can do so much more...
>
> Cheers, Kris
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
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