Comparing typenames in C++

Viewed 19851

I typed this into a template function, just to see if it would work:

if (T==int)

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

std::cout << (int)int;  // looks stupid doesn't it.
6 Answers
Related