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
No, this is not valid C++.
IntelliSense is not smart enough to find everything that is wrong with code; it would have to fully compile the code to do that, and compiling C++ is very slow (too slow to use for IntelliSense).