
10 Jun
2012
10 Jun
'12
2:24 p.m.
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.