A dynamic 'vector' container that cannot be resized

Is there a container like std::vector that is guaranteed not to be resized or re-allocated? I would like to take pointers to objects stored in the vector, but I want to guarantee the array isn't re-allocated. I can't use boost::array because I want the size of the array to be dynamically determined at runtime.

What do you want to happen when you're inserting a new element? If you don't plan on inserting anything, then you can use std::vector; it won't reallocate on its own.
There's also std::deque, which doesn't reallocate existing elements even as you expand it and std::list, which doesn't reallocate even if you erase in the middle.
Why not a vector of pointers to objects? Makes more sense to me.
Or even std::vector<std::tr1::shared_ptr<Object>>
Then again, I don't know what it is you're trying to do.
Topic archived. No new replies allowed.