Boost logo

Boost :

From: Schoenborn, Oliver (Oliver.Schoenborn_at_[hidden])
Date: 2002-10-04 09:58:32

> [...]
> This is a general response to the thread.
> 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 of
> type "T const *" using the standard pointer conversion.

A smart pointer IS-NOT-A pointer either. So although all of the above is
true, from a *usage* point of view there is no difference to the programmer
(though of course to the compiler writer the difference differences are
critical): a const smart_ptr for T should be usable wherever one for const T
can be used.


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