Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2002-07-30 15:19:44

"Philippe A. Bouchard" <philippeb_at_[hidden]> wrote in message
> [...]
> ptr<Derived> pD = new Derived;
> ptr<Derived, X> pX = new X;
> ptr<Derived, Y> pY = new Y;
> pX = pD; // Won't work
> pY = pD; // Won't work
> [...]

Of course, this syntax is clumsier than existing pointers, and also less
powerful. For instance, you may have code that knows about X or Y,
but not about anything derived from X or Y. Your proposal requires
such code to know about all possible derivatives in order to work
properly, which is a fairly restrictive requirement.


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