|
Boost : |
Subject: Re: [boost] rvalue ref best practices?
From: Peter Dimov (pdimov_at_[hidden])
Date: 2012-06-13 10:12:02
Mathias Gaunard wrote:
> On 12/06/2012 22:54, Peter Dimov wrote:
> > Mathias Gaunard wrote:
>
> >> foo(T const& t_) : t(t_) {}
> >
> > That, however, does a copy for rvalues, too.
>
> Yes, the solution to optimize rvalues is to addd an rvalue reference
> overload, but that's beside the point.
Or 2^N overloads, if there's more than one argument to consume.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk