From: dan marsden (danmarsden_at_[hidden])
Date: 2007-06-13 03:02:00
>dan marsden wrote:
>> The above change has now been applied. Docs upgrades will follow in the next few days.
>The usage of boost::result_of is right?
>IIRC, for example, <transform_view/detail/apply_transform_result.hpp> should be
> template <typename T0>
> struct apply<T0, void_>
> : boost::result_of<F(typename add_reference<T0>::type)>
>, because the object passed to a functor is lvalue.
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. The Boost.ResultOf docs are not specific about passing T versus T&. Looking a the draft TR1 docs,
if Ti is a reference ti is an lvalue, otherwise it is an rvalue. As rvalues are possible, the above code looks correct. Assuming Boost.ResultOf
behaves like the TR1 spec, I think the above is ok(?)
It is possible this usage is not consistent correct across Fusion though. I'll have a review of the result_of usage shortly when I get a chance.
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk