
30 Jun
2012
30 Jun
'12
6:08 p.m.
The safe solution is returning Number, not Number&&. If Dave reads this message, he can probably point us to previous discussions about this. Being able to return Number&& would be great...
Can you explain why it's unsafe given that we know that the value returned is an rvalue ref already?
Note that changing the return type from Number&& to Number cancels the allocation gain when using a type like GMP that doesn't have an empty state.
Which would not be so good :-( Cheers, John.