是C ++ 11(C ++ 0x)一个完整的超集C ++ 03? [英] Is C++11 (C++0x) a complete super set of C++03?

查看:168
本文介绍了是C ++ 11(C ++ 0x)一个完整的超集C ++ 03?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C ++ 考虑了(几乎)超集 C ;但仍然有一些在 C 而不在 C ++ 中有效的方法。

C++ considered (almost) super set of C; but still there are certain things which works in C and not in C++.

是否有任何功能/功能是有效的 C ++ 03 ,但不能在 C ++ 11

Is there any feature/facility which is a valid C++03 but not working in C++11 ?

推荐答案


是否有任何功能/功能是
a有效C ++ 03但不能在C ++中工作11

Is there any feature/facility which is a valid C++03 but not working in C++11 ?

有几个不兼容性:


  • 导出模板已删除(不推荐,真的删除)

  • 您不能使用 auto 作为存储说明符

  • 有新的保留字: alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local

  • export template is removed (not deprecated, really removed)
  • you can't use auto as storage specifier anymore
  • there are new reserved words : alignof, char16_t, char32_t, constexpr, decltype, noexcept, nullptr, static_assert and thread_local

,对于未来版本:


  • std :: auto_ptr
  • 抛出的规范已弃用

也许我缺少其他人,但如果你的代码使用那些,

Maybe I'm missing others, but if your code uses those, you'll have to fix it.

几乎所有C ++ 2003功能仍然是相同的,或者更精确地指定用于C ++ 2011中的编译器实现。

Almost all C++2003 features still are the same or are more precisely specified for compiler implementations in C++2011.

这篇关于是C ++ 11(C ++ 0x)一个完整的超集C ++ 03?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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