|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-01-28 09:14:25
From: "David B. Held" <dheld_at_[hidden]>
> Andrei suggested that I pose this question to several groups, as
> it is relevant to all of them. While the problem was originally
identified
> by Richard Crossley, Andrei sums it up pretty well right here:
>
> The problem is, auto_ptr's behavior relies on the chain:
>
> smart_ptr -> operator by_ref() -> smart_ptr(by_ref)
>
> My understanding is that the template constructor:
>
> template
> <
> typename T1,
> template <class> class OP1,
> class CP1,
> template <class> class KP1,
> template <class> class SP1
> >
> SmartPtr(SmartPtr<T1, OP1, CP1, KP1, SP1> const& rhs)
>
> is going to somehow get in the way by "eating" everything,
> and in particular not allow the constructor:
>
> SmartPtr(ByRef<SmartPtr> rhs)
>
> to kick in, as it should.
The first question, of course, is: do you really need SmartPtr<...> to
support move semantics (in current C++)?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk