|
Boost : |
From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2007-07-13 05:38:18
Peter Dimov wrote:
> Stjepan Rajko wrote:
>
>> [comes to a screeching halt from changing code]
>
> Yep. :-)
Sorry for the false alarm!
>> I'm still not entirely on very sure footing when it comes to rvalues
>> and lvalues, so can I bother you with a practical clarification?
>>
>> So, if I have, say, a function object with operator()(int &), I should
>> specify result<F(int &)>, (but maybe if I have operator()(const int
>> &), or operator()(int), I can specify result<F(int)>?)
>
> If you have operator()( int& ), you need result<F(int&)>. If you have
> operator()( int ), you need both result<F(int)> and result<F(int&)> because
> your operator() can take either an lvalue or an rvalue.
We'd also need 'int const &' (given we don't just provide 'result_type'
or deduce whatever it is), right?
Regards,
Tobias
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk