Boost logo

Boost :

From: cppljevans_at_[hidden]
Date: 2003-09-30 09:34:48


On 09/29/2003 06:31 PM, David Abrahams wrote:

> "Powell, Gary" <powellg_at_[hidden]> writes:

[sni[

>>
>> and replace it with one that takes a temporary that is created only
by make_shifted_ptr?
>
>
>
> No, I was suggesting making the constructor private, making
> make_shifted_ptr a friend, and have make_shifted_ptr<T>(...) return a
> shifted_ptr<T>.

And David has already anticipated the "forwarding function" problem,
i.e. the need for, in the worse case, duplication of each T(...)
with a corresponding make_shifted_ptr<T>(...).
See:

http://article.gmane.org/gmane.comp.lib.boost.devel/7061/match=factory+ptr+jcampbell3


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk