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?
My workplace solved all problems of this kind by introducing a continuous integration server. In our case we were quite satisfied with TeamCity. It is very customizable, and with some bash scripting I am sure you can present gcc errors nicely within TeamCity. I customized our server to the point where I was also getting Doxygen errors presented nicely and we reduced the number of errors from an initial 11000 to 0, over a couple of months.
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With