#include <iostream>
#include <map>
#include <vector>
#include <string>

template<typename MapT>
std::vector<typename MapT::mapped_type> mapToVec(const MapT &_map)
{
   std::vector<typename MapT::mapped_type> values;
   values.reserve(_map.size());
   for(const auto &entry : _map)
   {
      values.push_back(entry.second);
   }
   return values;
}

int main()
{
	std::map<int, std::string> m;
	m[1] = "one";
	m[2] = "two";
	m[3] = "three";
	
	auto v = mapToVec(m);
	for(const auto &entry : v) {
		std::cout << entry << " ";
	}

	return 0;
}