C++0x 和 C++11的区别

The old -std=c++0x is only needed for older compiler versions that did not support -std=c++11 and they chose that name to express the preliminary and unstable nature of features (and the ABI) of the then upcoming C++11 (and when it was still unclear whether that would eventually become C++10 or C++12). They changes some of the details adapting to the changing working drafts of the standard at the time before the C++11 standard was officially released.If your compiler supports -std=c++11, there is no reason to use -std=c++0x. Concerning compatibility: There might even be differences and incompatibilities, but these are not just bound to the use of -std=c++0x, but to specific versions of the compiler. When the compiler supports both, they should be identical.

旧的-std=c++0x 只针对那些不支持 -std=c++11的旧编译器版本,他们选择这个名称来表示随后的( 当它还不清楚是否最终会变成 C++10 或者 C++12 时)的特性的初步和不稳定特性。 在C++11标准正式发布之前,他们更改了适应标准变更工作草稿的一些细节。

如果编译器支持 -std=c++11,则没有理由使用 -std=c++0x 。 有关兼容性:甚至可以能存在差异和不兼容性,但这些不仅限于 -std=c++0x的使用,而是编译器的特定版本。 当编译器同时支持两者时,它们应该是相同的。

参考

https://stackoverflow.com/questions/9538701/what-is-the-difference-between-c0x-and-c11

https://www.zhihu.com/question/20141092

https://www.douban.com/note/577010219/

https://www.tutorialspoint.com/What-is-the-difference-between-Cplusplus0x-and-Cplusplus11

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值