From: Greg Colvin (Gregory.Colvin_at_[hidden])
Date: 2003-03-07 21:16:02
What are you trying to do?
Usually weak_ptr is used as the value in a map with some other key, so
that just being in the map doesn't prevent an object from being deleted.
At 06:52 PM 3/7/2003, Joe Gottman wrote:
> I just realized that it would be impossible to use weak_ptr with any
>hash. The problem is that the hash function would have to use weak_ptr's
>get() method. Then if the underlying object of the weak_ptr gets destroyed,
>get() will suddenly return 0 instead of the previous pointer, so the hash
>function will now map the weak_ptr to a new bucket. Is there any way to
>add a member function that returns a const void * that will be invariant
>even if the underlying object of the weak_ptr has been destroyed?
>Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk