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



_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to