Is there any way that I can find the container pointed to by an iterator? Specifically, I want to be able to find the std::vector pointed to by a particular std::vector::iterator so that I can check the range, without having to actually pass references to that vector around.
If (as I suspect) the answer is no, why not?
edit: thanks for a number of quick and (largely) accurate answers. Evan Teran nails it. I wasn't thinking about optimisation at all, but it's obvious now.
A couple of people asked what I want to do this for. It's nothing terribly important. I have an object which is initialised with a vector and an iterator pointing into the vector. It would be cute and convenient if I could initialise the object just with an iterator, because then I could convert vector::iterators directly to this object (this sounds strange but does make sense in the particular case). But it's not crucial at all.