Dev-Cpp 5.11是否支持C ++ 11? [英] Does Dev-Cpp 5.11 support C++ 11?

查看:127
本文介绍了Dev-Cpp 5.11是否支持C ++ 11?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很难在第一个Google页面上找到明确的答案.我很难理解语言标准"一词.我的意思是,新标准应该在软件级别实施,对吗?这不仅是用户现在可以执行的发现列表,对吗?我使用委托的构造函数,得到警告:

I struggled to find a clear answer on the first Google page. I have troubles understanding the term "Language standard". I mean, the new standard should be implemented on a software level, right? It's not just a list of things discovered that users can now do, right? I use delegating constructors, get a warning:

[警告]委托构造函数,仅可用于-std = c ++ 11或-std = gnu ++ 11

[Warning] delegating constructors only available with -std=c++11 or -std=gnu++11

虽然事情似乎可以按照我希望的方式工作.这样的警告是否至关重要?如果是这样,我该如何摆脱呢?

Though things seem to work the way I want them to. Is such warning critical? If so, how do I get rid of it?

推荐答案

Dev-Cpp只是用于编码器的IDE(前端),位于其后的是MinGW,其GCC 4.9.2作为编译器*.因此,每当您单击运行"或构建"时,GCC都会执行肮脏的工作.默认情况下,GCC使用C ++ 03标准,要使用较新的标准,您必须通过编译器标志 -std = c ++ 11 明确地告诉它.您可以在工具->编译器选项->设置->代码生成->语言标准(-std)中进行更改.

Dev-Cpp is just IDE (frontend) for coder and behind it sits MinGW with GCC 4.9.2 as compiler*. So every time you click "Run" or "Build" it is GCC to do the dirty job. GCC by default uses C++03 standard and to use newer one you have to tell it explicitly via compiler flag -std=c++11. You can change it in Tools->Compiler Options->Settings->Code generation->Language standard (-std).

我不确定为什么委派构造函数可以在没有C ++ 11(可能具有某些GCC功能)的情况下工作,但是可以肯定的是,如果没有-std = c ++ 11,您将无法使用C ++ 11库.它也会摆脱警告.

I am not sure why delegating constructors could work without C++11 (probably some GCC feature), but for sure you will not be able to use C++11 libraries without -std=c++11. It will also get rid of the warning.

(*假设您使用默认的Dev-C ++安装程序.)

(* Assuming you used default Dev-C++ installer.)

这篇关于Dev-Cpp 5.11是否支持C ++ 11?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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