Boost logo

Boost :

Subject: Re: [boost] rvalue ref best practices?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-06-10 10:24:17


On 09/06/2012 22:49, Giovanni Piero Deretta wrote:

> As per http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/ ,
> if the function is likely to consume or copy the parameter, the best
> solution is to pass by value. This means you'll only need to provide a
> single overload.

That is not true. This technique only applies if you need to make a copy
at an arbitrary place, not in a particular subobject.


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