禁用vs2013中的c ++ 11功能 [英] disable c++11 features in vs2013

查看:109
本文介绍了禁用vs2013中的c ++ 11功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在vs 2013中编写代码时,是否可以禁用c ++ 11功能,我希望我的代码也可以在vs2008之类的较早版本上进行编译。

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厌倦了通过以下方式进行更改:
project-> properties-> general-> platform工具集,然后将 Visual Studio 2013(v120)
更改为较旧的东西,但这是我唯一的选择

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 .

推荐答案

如果安装了其他版本的Visual Studio,则可以选择较旧的工具集。

If you have other versions of Visual Studio installed then you can select the older tool set. This may help a little.

更好的解决方案,恕我直言,是设置一个持续集成服务器,该服务器为所有受支持的编译器,配置和平台构建代码。然后,您在执行不支持的操作后会立即中断构建。理想情况下,CI服务器还可以运行所有单元测试,以便您还可以查看是否有任何配置破坏了测试。

A better solution, IMHO, is to set up a continuous integration server that builds your code for all supported compilers, configurations and platforms. You will then get build breaks as soon as you do something that isn't supported. Ideally the CI server also runs all of your unit tests so that you also see if any of your configurations break your tests.

这篇关于禁用vs2013中的c ++ 11功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆