Possible Duplicate:
C++ Template Metaprogramming - Is it possible to output the generated code?
How can I see all the instantiations that occur after compiling the template in my C++ code? For example, after compling this code:
#include <iostream>
using namespace std;
template <class a_type> class TemplateClass {
a_type m_one ;
a_type m_two ;
};
int main (){
TemplateClass<int> intClass ;
TemplateClass<char> charClass ;
}
I want to see a C++ file with class:
template <int> class TemplateClass {
int m_one ;
int m_two ;
};
and same class with char
. I prefer suggestions in Eclipse or Visual Studio.