Subject: Re: [boost] rvalue ref best practices?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-06-13 16:49:33
On 13/06/2012 22:43, Nevin Liber wrote:
> On 13 June 2012 14:44, Gpderetta<gpderetta_at_[hidden]> wrote:
>> You can have a thin template forwarding to a single externally compiled
>> implementation using for example rvalue references for all parameters. The
>> template would copy or move depending on the actual parameter type.
> So we've moved from 1 function to 2N+1 functions. I also don't quite see
> how this will work with member initializers, as I don't want to do
There is no magic. If you want different code fro 2^n cases, you need to
have 2^n functions. You can generate them through a sngle template
function, or you can write them all by hand.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk