Boost logo

Boost Users :

From: Daryle Walker (darylew_at_[hidden])
Date: 2005-01-11 02:52:04


On 1/9/05 2:50 PM, "Jens Theisen" <jens.theisen_at_[hidden]> wrote:

> the above class (doesn't?) currently addresses the forwarding problem by
> passing constructor argument by value. Would it not be a better idea to
> use const&? We can't pass variable references at the moment, can we?

The forwarding problem looks like a C++ "flaw" that can't be solved
trivially. So I'm not going to pretend to have a solution. Take a look at
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm> for a
description of the problem. (I saw the link in another thread.)

I never checked how the constructors work with reference-based arguments,
either const or non-const. (I guess that const references could work since
they can take conversion-generated temporaries.)

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net