I have a boost multi-index structure that keeps boost::shared_ptr to instances of a class A.
When I use the "find" function of one of the index, I get an iterator "it" from which I can get back the actual pointer through A* a = it->get();
. How can I delete a
from the multi-index knowing that the erase
function of the multi-index structure takes an iterator, not a pointer nor a boost::shared_ptr? The thing is at the point of the program where I want to erase the object, I don't have anymore my initial iterator, only the actual pointer.
Thanks