
12 Jul
2007
12 Jul
'07
7:35 p.m.
Stjepan Rajko wrote:
On 7/12/07, Tobias Schwinger <tschwinger@isonews2.com> 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.