Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c++

c++11

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

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

like image 510
iammilind Avatar asked Jun 09 '11 12:06

iammilind


2 Answers

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.

like image 66
Klaim Avatar answered Sep 25 '22 06:09

Klaim


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

like image 41
vines Avatar answered Sep 26 '22 06:09

vines