|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-07-29 08:42:14
From: "Philippe A. Bouchard" <philippeb_at_[hidden]>
>
> Don't you have an idea of what is going on in the backstage here?!?
Again,
> my main goal is to add 1 integer length when the object is allocated; one
> malloc call not two (for counters); copying is faster when
> sizeof(shared_ptr<type>) == sizeof(type *);
You are still missing an important point; what you are describing is _not_ a
shared_ptr. When you have
struct X { int i; };
struct Y { int j; };
struct Z: public X, public Y {};
when you insert an integer on 'new Z', this integer may not necessarily be
at the correct place for X, and will most likely _not_ be at the correct
place for Y; therefore, the implicit conversion from shared_ptr<Z> to
shared_ptr<Y> (and possibly to shared_ptr<X>, too) will not work.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk