#include <iostream>
#include <vector>

using namespace std;

enum Types
{
	Int,
	Double
};

//Use struct instead of class for auto-public.
template<Types> struct TypesMap;

template<> struct TypesMap<Int>
{
	using type = int;
};

template<> struct TypesMap<Double>
{
	using type = double;
};

int main() {
	std::vector<void*> Test;
	
	Test.push_back(new TypesMap<Int>::type(0.5));
	Test.push_back(new TypesMap<Double>::type(0.5));
	
	std::cout << *((TypesMap<Int>::type*)Test[0]) << " " << *((TypesMap<Double>::type*)Test[1]);
	
	return 0;
}