Boost logo

Boost :

From: Andy Glew (glew_at_[hidden])
Date: 1999-09-17 15:26:57


> Actually, the indirection didn't work, because you can't safely go from
> Derived* to void* to Base*, so my current implementation does without
> it. The cost is that weak_ptr is slower.

May I take a look at your current implementation?
Is it in Boost?

Q: how do you get a non-intrusive implementation without
the level of indirection? Do you use a global registry?

A global registry mapping pointee to pointer will work
if all you need to do is associate some data with the pointee,
said data being manipulated entirely within the pointer.
It does not work for callbacks from pointee events.
(Without some awful hacking, e.g. of the allocator/deallocator.)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk