I think that addressing the dereferenced iterator address is the right way to achieve what you are trying to do.
iterator it = ... T *ptr = &*it;
However, this is dangerous because you can end up with dangling pointers if object A is destroyed before objects B. That's why the release function, which allows the caller to take the address of the object, also remove the pointer from the container.
If you can support overhead, you might consider changing boost::ptr_vector to a smart pointer vector, for example. std::vector<boost::shared_ptr<T> > .
source share