| 1 |
The new C++ standard adds many features to the language. Some are intended to make the language easier to learn and easier to use. Examples include uniform braced list initialization, automatic type deduction with auto, in-class member initialization, and the range-based for loop. Other changes expand and clarify class design. |
| 2 |
These changes include defaulted and deleted methods, delegated constructors, inherited constructors, and the override and final specifiers for clarifying virtual function design. Several additions aim to make programs and the act programming more efficient. Lambda expressions provide advantages over function pointers and functors. |
| 3 |
The function template can be used to reduce the number of template instantiations. The rvalue reference enables move semantics and allows for move constructors and move assignment operators. Other changes deliver better ways of doing things. Scoped enumerations provide better control over the scope and underlying types for enumerations. The unique_ptr and shared_ptr templates provide better ways of handling memory allocated with new. |
| 4 |
Template design has been enhanced with the addition of decltype, trailing return types, template aliases, and variadic templates. Modified rules for unions, PODs, the alignof() operator, the alignas specifier, and the constexpr mechanism support low-level programming. Several library additions, including the new STL classes, the tuple template, and the regex library, provide solutions to many common programming needs. |
| 5 |
The new standard addresses concurrent programming with the thread_local keyword and the atomic library. All in all, the new standard improves the usability and reliability of C++, both for novices and for experts. |
Комментарии