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

查看:23
本文介绍了在 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.

我厌倦了通过以下方式改变:项目->属性->通用->平台工具集,并更改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天全站免登陆