Coroutines & Modules Added For C++20
The ISO C++ committee has wrapped up its winter meeting in Hawaii that also served as the last meeting for approving new features for the upcoming C++20 revision to the C++ programming language.
At this week's meeting, the last of the C++20 features were considered while at the next meeting in the summer will be taking care of some loose ends and then taking C++20 to the international comment ballot.
Two previously talked about features that have been under consideration for C++20 were officially approved: modules and coroutines. C++ modules are an alternative to C++ header files that make it simpler to use software libraries and provides for better compile-time scalability and avoid various shortcomings of the compiler's pre-processor behavior. The coroutine concept is similar to the functionality in other programming languages for non-preemptive multitasking and the approved C++ coroutines state is similar to the experimental support already in LLVM Clang (in fact, they have now enabled it with the -std=c++2a switch).
At this week's meeting they also adopted new vectorization policies for the parallel STL algorithms, polymorphic_allocator was added, std::span changes, and other smaller work.
These latest changes come on top of other previously approved additions including C++ concepts, designated initializers, ranges, a revised memory model, a three-way comparison operator, feature test macros, and much more.
More details on the latest decisions around C++20 can be found via this trip report by Herb Sutter.
For those wondering about the current C++20 state in the GCC compiler can see this status matrix as well as the Clang status.
At this week's meeting, the last of the C++20 features were considered while at the next meeting in the summer will be taking care of some loose ends and then taking C++20 to the international comment ballot.
Two previously talked about features that have been under consideration for C++20 were officially approved: modules and coroutines. C++ modules are an alternative to C++ header files that make it simpler to use software libraries and provides for better compile-time scalability and avoid various shortcomings of the compiler's pre-processor behavior. The coroutine concept is similar to the functionality in other programming languages for non-preemptive multitasking and the approved C++ coroutines state is similar to the experimental support already in LLVM Clang (in fact, they have now enabled it with the -std=c++2a switch).
At this week's meeting they also adopted new vectorization policies for the parallel STL algorithms, polymorphic_allocator was added, std::span changes, and other smaller work.
These latest changes come on top of other previously approved additions including C++ concepts, designated initializers, ranges, a revised memory model, a three-way comparison operator, feature test macros, and much more.
More details on the latest decisions around C++20 can be found via this trip report by Herb Sutter.
For those wondering about the current C++20 state in the GCC compiler can see this status matrix as well as the Clang status.
38 Comments