Is C++11 (C++0x) a complete super set of C++03?
C++
considered (al开发者_Python百科most) 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
?
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
andthread_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.
No, it isn't a strict superset. extern template
and auto
, to name a few differences..
精彩评论