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

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

c++ - disable c++11 features in vs2013

Is there a way to disable c++11 features when writing code in vs 2013 , I want my code to also compile on older compiles like vs2008.

I tired to change via: project->properties->general->platform tool-set, and change "Visual Studio 2013 (v120)" to something older , but this is the only thing i have in the drop down menu there .

See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)

You can't.

Unfortunately you can not disable C++11 features and downgrade to C++03 or C++98 in Visual Studio. You can see what features belongs to C++11 here and here, try not to use them.

However a better choice is to use older VS versions to make sure that you don't use any new feature.

Personally, I use MinGW/GCC in Windows and I can disable C++11 by using a compiler switch -std=c++03, -std=c++98 or not using -std=c++11.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...