MSVC is currently one of the most standards compliant compilers available and has been since Visual Studio .NET 2003.
The last version I used was later than 2003, I don't remember which, but whatever version it was
still didn't parse template code prior to instantiation. For example, it would happily accept the following:
template <typename Type>
void Funk()
{
lsdsdafhjfsdahfauhae
}
You wouldn't get an error message until instantiation. G++, Intel, and Comeau all parse templates to look for errors prior to instantiation (as required by the standard) and catch errors while the template is still in generic form.
Does VC++ finally require the use of
typename in templates when referring to dependent nested types? This is another one that burns programmers coming from VC++ to other compilers. Last I knew, VC++ would accept this illegal code:
template <typename Type>
void Funk(std::vector<Type> v)
{
std::vector<Type>::iterator i; // Illegal. Requires typename before std::vector<Type>::iterator.
}
I follow the GCC mailing lists, and not a month goes by without someone reporting this as a GCC bug when it won't accept this code, ported from some VC++ project.
To call VC++ one of the most standards compliant compilers is really stretching it. Intel and Comeau are both based on the EDG backend, which is basically 100% compliant, even supporting the
export keyword. G++ is way ahead of VC++ in proper template support. The only other major supported C++ compiler I'm aware of is Borland's, and I think they basically mirror VC++'s policies. Unless there are a whole bunch of supported C++ compilers that I'm not aware of, VC++ is one the
least compliant compilers out there.
Of course, I haven't touched it in a few years, nor do I plan to. Maybe it's gotten better.