Boost logo

Boost :

From: Douglas Paul Gregor (gregod_at_[hidden])
Date: 2003-10-01 11:48:51


On Wed, 1 Oct 2003, Gregory Colvin wrote:
> On Wednesday, Oct 1, 2003, at 09:52 America/Denver, David Abrahams
> wrote:
> > It's not meant to be a T
> > neccessarily. It's just any old argument to T's constructor. You
> > need a bunch of overloads for make_shifted_ptr to make the example
> > complete.
>
> I was wondering if the infinite series of overloads can be dispensed
> with
> in favor of requiring that T have an accessible copy constructor. Peter
> says that his compilers fail to optimize away the extra copy of T, but I
> don't whether the standard allows the optimization.

We can't require T's to be copyable; we use pointers when we want to pass
around references to noncopyable types.

        Doug


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