Is C++11 (C++0x) a complete super set of C++03?

前端 未结 2 700
小蘑菇
小蘑菇 2020-12-30 04:17

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

Is th

相关标签:
2条回答
  • 2020-12-30 04:21

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

    There are few incompabilities :

    • 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

    also, for future versions :

    • std::auto_ptr is deprecated
    • throw specifications are deprecated

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

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

    0 讨论(0)
  • 2020-12-30 04:30

    No, it isn't a strict superset. extern template and auto, to name a few differences..

    0 讨论(0)
提交回复
热议问题