Coroutines & Modules Added For C++20
Written by Michael Larabel in Standards on 23 February 2019 at 05:32 PM EST. 45 Comments
STANDARDS --
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.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week