
30 Jun
2012
30 Jun
'12
5:17 p.m.
On Sat, 30 Jun 2012, John Maddock wrote:
I've started to work through some of the points that came up in the multiprecision review, starting with further rvalue reference support.
The idea (due to Marc Glisse) was to add operator overloads that look something like:
Number&& operator+(Number&&a, const Number& b) { return static_cast<Number&&>(a += b); }
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... 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. -- Marc Glisse