Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Does C++0x mode in VC++ 2010 has an off switch? I am working on a project that supposed to compile on non 0x compilers, and therefore I want to compile against the current standard. (Even if non of the new features are being used directly, there are still subtleties that makes C++0x more premissive).

The closest switch I found was Configuration Properties -> C/C++ -> Language -> Disable Language Extensions but that's not it.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
169 views
Welcome To Ask or Share your Answers For Others

1 Answer

No, language extensions are typically non-standard vendor specific additions.

C++0X features: There is no direct way to switch off these features. One workaround is to not use them. However, note that there will still be marked difference in performance across versions of VC runtime. VC10 implements move semantics and the standard library (std::string for example) uses these features generously.

A reasonable compromise in my opinion is to switch back to VS2008. Recent VS versions have been notoriously buggy (so far, in my experience) and have never worked the way they should without a Service Pack. VS2008 is pretty stable now, without any of those C++0x features and ought to fit your bill.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...