Boost logo

Boost :

From: Csaba Szepesvari (cszepes_at_[hidden])
Date: 2003-05-13 16:34:35


> > - supporting the implementation of the pimpl idiom
>
> For this purpose I would like to see propagation of costness.

True.
One would like to use strong_ptr<const A> or strong_ptr<A const> but this
won't work..:(
The non-polymorphic copy uses new T() and this does not compile.
Would need a way to derive the type "A" given "const A".
Using partial template specialization, this should be easy..
Without partial template specialization, I am not good enough at type
calculus..
Any ideas?
Of course, as a last resort one can introduce a new type, e.g.
strong_ptr_const<T>.

- Csaba


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