
shunsuke wrote:
Eric Niebler wrote:
As shown above, lvalue/rvalue-ness doesn't guarantee the complete safety. I think your argument is specious.
I just show a counter-example. It might not be a real use case, though. I think
int i; /* perform elaborate calculations for i. */ return make_tuple(rvalue(i));
seems odd.
I actually agree. I've looked again at fusion::make_tuple and I see I misremembered its behavior. It always stores arguments by value unless the argument is a reference_wrapper. That seems reasonable, even in C++0x. So maybe I'm coming around to thinking that function objects that do something different with lvalues and rvalues are always a bad idea, even in C++0x. Not sure yet what the implications are for proto transforms. -- Eric Niebler Boost Consulting www.boost-consulting.com