Boost logo

Boost :

From: dan marsden (danmarsden_at_[hidden])
Date: 2007-06-19 17:40:13

shunsuke wrote:
>dan marsden wrote:
>> I'm not sure about this. The function object f is called with f(*it). The dereference may return either l or rvalues depending
>> on its implementation.
>I didn't know '*it' could be rvalue.
>It seems that result_of::deref can be used.

Fusion fold and transform now pass the output of deref to result_of. This will mean references for lvalues and non references for rvalues, as per the TR1 result of protocol. This means writing result specializations can now be a bit fiddlier, as some reference stripping can be required.

On the up side, when phoenix has been upgraded, suitable phoenix expressions should operate correctly with Fusion transform. For fold the benefit is less clear cut, as the current definition of Fusion fold means that the second argument is almost always going to be an rvalue as new state temporaries are passed around.

There may be need for more similar maintenance in the Fusion functional area to come.



Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today*

Boost list run by bdawes at, gregod at, cpdaniel at, john at