Comparing typenames in C++
<p>I typed this into a template function, just to see if it would work:</p>

<pre><code>if (T==int)
</code></pre>

<p>and the intellisense didn't complain. Is this valid C++? What if I did:</p>

<pre><code>std::cout &lt;&lt; (int)int;  // looks stupid doesn't it.
</code></pre>
