Boost logo

Boost :

From: Joe Gottman (jgottman_at_[hidden])
Date: 2003-03-07 20:52:13


   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?

Joe Gottman


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