Don't return std::vector by value, but pass it in by reference to be filled.