I wanted to disable language extensions to be able to do some tests in my project. I found that I must set /Za compiler directive from http://msdn.microsoft.com/en-us/library/0k0w269d.aspx , but after this I have errors if I include windows headers. Is there a way to write standard compliant code(enforced by the compiler, not by other programmers/code reviews) in VS2010 and still use system headers?
Thanks you!
将<windows.h>
使用隔离到不使用/Za
编译的源文件中,并在其他文件上使用该参数。
The windows headers have never compiled with /Za.
There are other problems as well with /Za, that has caused Microsoft to stop testing their C++ standard library with that option. As told here:
http://permalink.gmane.org/gmane.comp.lib.boost.devel/212180
The recommendation is not to use it in "real" code.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.