Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-11-18 01:03:47

"Daryle Walker" <darylew_at_[hidden]> wrote in message
> On 11/9/04 9:18 PM, "Jonathan Turkanis" <technews_at_[hidden]> wrote:

> > There's one change I'd like to see: the constructors should take rvalue
> > references ;-)
> But that would prevent lvalue references from ever being used.

I was kidding, of course, since we don't have rvalue references yet; but under
the current proposal, the correct way to write forwarding functions would be to
have all the functions parameters declared as rvalue references. (See

> However,
> since we can't explicitly specify the template parameters for a templated
> constructor, could reference arguments (of either type) ever be used?

Forwarding constructors which take arguments by reference should generally use
const references. (See #2 of I wouldn't want to
suggest that you switch to const references at this point, because I can't say
it wouldn't break some existing code. (Someone else can probably say.)


Boost list run by bdawes at, gregod at, cpdaniel at, john at