I would be careful about doing this. The std::vector container stores its contents in a contiguous portion of memory. If you resize the vector at any point, either directly by calling std::vector::resize or indirectly, by calling std::vector::push_back and the space available in the currently allocated memory for the vector isn't big enough then the whole contents of the vector might be moved to a different portion of memory. This will leave your vector of references still cointaining the old memory addresses of the elements of the vector, which is almost certainly going to result in areally nasty run-time bug! If you want to do this safely, you'll probably have to manage the memory yourself in some kind of clever way that stops this from happening. If the order of the elements isn't important to you, I think that you might be able use std::set instead.