Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2007-07-13 05:38:16


Peter Dimov wrote:
> Stjepan Rajko wrote:
>> On 7/12/07, Tobias Schwinger <tschwinger_at_[hidden]> wrote:
>>> It's wrong to have the signature for result_of contain references:
>>>
>>> The result_of specification says the parameter types in the signature
>>> type should be interpreted as types of L-Value arguments used in a
>>> call expression (cited from memory).
>>>
>> Hmm - yes, the proposal says:
>>
>> "given types F, T1, T2, ..., TN and lvalues f, t1, t2, ..., tN of
>> those types, respectively, the type expression
>>
>> result_of<F(T1, T2, ..., TN)>::type
>>
>> evaluates to the type of the expression f(t1, t2, ..., tN)."
>
> This was once true but is no longer. The final version of the result_of
> wording says that t1 is an lvalue when T1 is a reference, an rvalue
> otherwise.

Seems I correctly remembered the wrong version :-/. Thanks for this
catch (or maybe it was a throw?)

We should check that Fusion properly adds references, as the previous
result computation protocol used const/non-const L-Value types without
reference.

Looking into the Boost.ResultOf docs reveals that all three versions of
this text are outdated. Seems a good idea to fix it, too.

Regards,
Tobias


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk