What's new in C++14
C++11 and C++14 are both versions of the C++ programming language, with C++11 being the first major update to the language since C++98, and C++14 is the next minor update after C++11. Both versions bring new features and improvements to the language, but there are some key differences between the two.
One of the most notable differences between C++11 and C++14 is the level of support for concurrency and parallelism. C++11 introduced a number of new features to support multithreading and concurrency, such as the addition of the std::thread library and the introduction of the "auto" keyword. C++14 builds on these features, by adding new concurrency-related classes and functions to the standard library. For example, C++14 introduced the std::atomic<> class, which provides low-level atomic operations, and the std::shared_timed_mutex class, which allows for shared access to a resource.
Another difference between C++11 and C++14 is the level of support for functional programming. C++11 introduced a number of new features to support functional programmings, such as lambdas and closures. C++14 builds on these features, by adding new features for functional programmings, such as the introduction of the "auto" keyword, which allows for type inference, and the introduction of the "decltype" keyword, which allows for the expression of complex types.
C++11 also introduced a new feature called "Move semantics", which enables more efficient use of resources by allowing objects to be moved instead of copied. C++14 brings improvements to move semantics and added more functions to support it.
C++11 also introduced "uniform initialization" which allows for more consistent and predictable initialization of objects. C++14 brings further improvements to uniform initialization, such as the introduction of the "initializer_list" class, which allows for the initialization of arrays and containers with a list of values.
C++14 also includes a number of smaller improvements and bug fixes, such as the addition of new standard library functions, the introduction of extended constexpr support, and the addition of new features for improved type safety.
In conclusion, C++11 and C++14 are both versions of the C++ programming language that bring new features and improvements to the language. C++11 introduced major changes to the language, such as support for multithreading and functional programming, while C++14 builds on these changes with additional improvements and new features.
No comments:
Post a Comment