Is there a switch I can supply to cl.exe
that will enable a warning or error when a typename
is missing from a qualified dependent type?
I'm working in an environment where developers tend to work one one platform, either Windows or Linux, and the code is ultimately built on both platforms nightly. We've encountered a problem with people forgetting to use typename
on qualified dependent types on Windows, where Visual C++ 2008 will automatically insert a missing typename
if possible. When they check in the code like this, it breaks the build on Linux, where g++
requires the typename
. It would be desirable to tweak the Makefile
such that we can expect the same typename
behaviour on Windows and Linux to mitigate the likelihood of the build breaking. I prefer the g++
behaviour, but anything that would help the two platforms behave the same would be much appreciated.
See also Why do I need to use typedef typename in g++ but not VS?