Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling C++0x features in VC 2010?

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.

like image 513
uj2 Avatar asked Aug 21 '10 02:08

uj2


2 Answers

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.

like image 178
dirkgently Avatar answered Nov 16 '22 04:11

dirkgently


It appears you can use the vc2008 toolset in VS2010 see: Visual C++ 2010 compatibility with VC 2008

like image 41
Jesse Pepper Avatar answered Nov 16 '22 02:11

Jesse Pepper