is there a way to know the compiler instantiated code for a template function or a class in C++
Assume I have the following piece of code
template < class T> T add(T a, T b){
return a+b;
}
now when i call
add<int>(10,2);
I would like to know the function that compiler creates for int specific version.
I am using G++, VC++. It will be helpful if some can help me point out the compiler options to achieve this.
Hope the question is clear. Thanks in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…