Can we see the template instantiated code by C++ compiler
<p>is there a way to know the compiler instantiated code for a template function or a class in C++</p>

<p>Assume I have the following piece of code</p>

<pre><code>template &lt; class T&gt; T add(T a, T b){
            return a+b;
}
</code></pre>

<p>now when i call</p>

<pre><code>add&lt;int&gt;(10,2); 
</code></pre>

<p>I would like to know the function that compiler creates for int specific version.</p>

<p>I am using G++, VC++. It will be helpful if some can help me point out the compiler options to achieve this.</p>

<p>Hope the question is clear. Thanks in advance.</p>
