Boost logo

Boost Users :

Subject: Re: [Boost-users] fusion Transformation function passed to transform
From: Joel de Guzman (joel_at_[hidden])
Date: 2010-02-25 21:02:08


On 2/26/2010 12:59 AM, Hicham Mouline wrote:
> Hello,
>
> The transformation function to pass to fusion::transform() function and metafunction
> are hard to get right, in particular the embedded inner result struct because of the
> fact that the template argument of result is a "function signature"

It assumes familiarity with the result_of protocol. See
http://www.boost.org/doc/libs/1_42_0/libs/utility/utility.htm#result_of
There's even a technical report on the matter.

> There is only the 1 simple example in
> libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/transform.html
>
> I for one would love to see another example where the fusion vector has different
> types, and where the result of transformation function depends on each type of the
> sequence transform is applied on.

Always check the example and test directories to see more examples.

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net
http://www.facebook.com/djowel
Meet me at BoostCon
http://www.boostcon.com/home
http://www.facebook.com/boostcon

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