Boost logo

Boost :

From: Schoenborn, Oliver (Oliver.Schoenborn_at_[hidden])
Date: 2002-10-04 11:48:53

> Before investing further efforts in this area, please do realize that raw
> pointers do not inherit from one another. "T *" IS-NOT-A "T const *" or "T
> volatile *", and "Derived *" IS-NOT-A "Base *". A const reference to "T
> const *" does not bind directly to a "T *", it binds to a temporary copy
> type "T const *" using the standard pointer conversion. This is exactly
> shared_ptr does, too, except that it uses a user-defined conversion, for
> obvious reasons.

I just realized that there may be a misunderstanding here. I never advocated
public inheritance from smart pointer<const T>, only NON-public. As such,
containment could be used instead of inheritance. I used the latter only for
convenience of implementation.

Also, I think the debate about smart pointer<Derived*> inheriting from smart
pointer <Base*> should be dealt with as a separate issue, as it's not
obvious to me that the technique applies, or that such feature is even


Boost list run by bdawes at, gregod at, cpdaniel at, john at