Mapping integers to types using C++ template fails in a specific case
- by Shailesh Kumar
I am attempting to compile the following template based code in VC++ 2005.
#include <iostream>
using namespace std;
/*
* T is a template which maps an integer to a specific type.
* The mapping happens through partial template specialization.
* In the following T<1> is mapped to char, T<2> is mapped to long
* and…