Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2003-01-28 12:39:44


"Douglas Gregor" <gregod_at_[hidden]> wrote in message
news:200301280939.39657.gregod_at_cs.rpi.edu...
> [...]
> 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,
> typename SmartPtr<T1, OP1, CP1, KP1, SP1>::copyable* = 0)
>
> In SmartPtrs are should be copyable, include
> typedef void copyable;
>
> In other SmartPtrs, don't include typedef copyable.

Hmm...this sounds interesting, but it sounds like it still requires PTS.
I see that you are applying SFINAE, but let's tweak it like so:

SmartPtr(SmartPtr<T1, OP1, CP1, KP1, SP1> const& rhs,
              typename OP1::copyable* = 0)

Now, you put the typedefs in the policies, which eliminates having to
create multiple specializations of SmartPtr itself. Thanks, Doug!

Dave


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