From: Mat Marcus (mat-boost_at_[hidden])
Date: 2004-02-07 15:26:31
--On Saturday, February 07, 2004 12:59 AM -0500 Brian McNamara
> On Fri, Feb 06, 2004 at 07:00:49PM -0500, David Abrahams wrote:
>> The example below shows a technique for perfect forwarding that
>> seems to work with GCC 3.3.1. rvalues are always moved
>> automatically, and lvalues are copied.
> I had to Google for "perfect forwarding" to discover
> (which I'd read before but forgotten about).
> It is unclear to me if/how your code solves the "perfect forwarding"
> problem. Instead it appears to show a way to make a particular type
> "movable". Have I misunderstood? (How) does your generalize to a
> way to write forwarding functions?
> It seems you have a clever way to effectively "detect rvalue-ness";
> the copy-constructor and the "pseudo-copy-constructor" (the thing
> with the enable_if) only swallow lvalues, whereas rvalues find a
> more attractive construction path via "ref". Is that a correct
Some additional background is available here:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk