I need to satisfy an api function that requires a vector:
void api_function(std::vector<int> vec);
For another reason, I keep values in a
std::map<int,int> map;
Now I need to pass the values of this map to the api_function.
Is there a way to do that without too much space and time overhead, i.e. without iterating through all values or creating a new vector?