Boost logo

Boost :

Subject: Re: [boost] [multiprecision] Some rvalue reference experiments (performance inhancements #1)
From: John Maddock (boost.regex_at_[hidden])
Date: 2012-06-30 14:08:15


> 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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk