Returning a vector like this is pretty expensive in C++03. Maybe this should be an out parameter?