在Visual Studio中更改(使用较旧的)C ++版本 [英] Change (use older) c++ version in Visual Studio

查看:110
本文介绍了在Visual Studio中更改(使用较旧的)C ++版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Visual Studio中使用比c ++ 11更旧的版本?一个类似的问题表明,不可能使用较新的版本,但是当我使用仅适用于c ++ 11的语言功能时,我希望编译器抱怨.

Is it possible to use an older version in Visual Studio than c++11? A similar question revealed that it is not possible to use a newer version, but I want the compiler to complain when I am using language features that are only available for c++11.

推荐答案

要完全禁用Visual Studio中的C ++ 11功能,必须使用足够老的工具集进行编译,使其不具有任何C ++ 11功能.不支持C ++ 11的Visual Studio的最新版本是VS2008(关于此的问题:具有c ++ 11的Visual Studio 2008 ).

To completely disable C++11 features in Visual Studio, you must compile with a toolset old enough that it does not have any C++11 features. The last version of Visual Studio to have no C++11 support was VS2008 (question about that here: Visual Studio 2008 with c++11).

要使用较旧的工具集,必须首先安装该版本的Visual Studio,然后修改配置属性->常规->平台工具集"并将其设置为适当的Visual Studio版本.当您使用Visual Studio 2008工具集进行编译时,任何C ++ 11的用法都会出错.

To use an older toolset, you must first install that version of Visual Studio, and then modify the "Configuration Properties->General->Platform Toolset" and set it to the appropriate Visual Studio version. When you compile with Visual Studio 2008 toolset, any C++11 usage will be errors.

这篇关于在Visual Studio中更改(使用较旧的)C ++版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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