$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Csaba Szepesvari (cszepes_at_[hidden])
Date: 2003-05-13 17:13:05
> > - 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 (PTS), this should be easy..
I am not good enough at type
calculus to do this without partial template specialization.. Perhaps
someone on the list can suggest a workaround?
Of course, as a last resort one can introduce a new type, e.g.
strong_ptr_const<T>.
A common underlying implementation could be worked out using a more general
parameterized variant of these types.
(Btw, am I right that lambda does not work without PTS and therefore I
cannot use the elegant IF_type construct together with remove_const to
remove the const?)
- Csaba