Date: 2001-05-21 15:18:41
Thanks for the feedback. After thinking about it I'm beginning to
understand what you meant by a linked list.
If you don't mind I'd like to get a copy of the linked list
implementation you spoke of. Could you send it to
Greg_at_[hidden] (that's a better address for code than my
--- In boost_at_y..., "Eric Ford" <eford_at_m...> wrote:
> > I was wanting to get by without making a copy of the shared
> > but after your comment about it not being "safe" as far as the
> > Standard is concerned I started thinking and realized that
> > are allowed to do any manner of magic when downcasting or
> > classes so not allowing the compiler to truly typecast the object
> > pointer contained within the smart pointer would not be portable
> > if it did work for my platform. Of course, you may be referring
> > something else that I'm not even thinking of.
> Thanks for your code snippet. I don't really like using non-standard
> code, especially since in this case it could cause really weird and
> hard to track down bugs, should it ever become a problem.
> As for how to solve the problem, I was thinking of using a smart
> pointer that used a linked list rather than a simple reference
> Then if all the linked smart pointers were derived from a common
> (empty) base class, the linked list could include linked smart
> pointers of different types. I'm afraid there might be a
> performance penalty, though. Maybe someone more familiar with how
> compilers implement these things could comment.
> Anyway, I've been busy with other things and have just left some
> code in place for the time being. If you or someone else do
> something like this, please let me know. If you'd like I can
> smart pointer implemented in terms of a linked list (not my own but
> freely distributable).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk