Experimental Support For C++20 Coroutines Has Landed In GCC 10
Written by Michael Larabel in GNU on 18 January 2020 at 08:16 AM EST. 30 Comments
GNU --
As of this morning experimental support for C++20 coroutines has been merged into the GCC 10 compiler!

Coroutines allow a function to have its execution stopped/suspended and then to be resumed later. Coroutines is one of the big features of C++20. Sample syntax and more details on C++ coroutines can be found at cppreference.com.

Coroutines support for GCC has been under development for months and now as a late addition to GCC 10 is the experimental implementation.

Given the early state of this functionality and being late in the GCC 10 development cycle, coroutines isn't exposed for -std=c++2a but for now explicitly requires the -fcoroutines flag be set.

More details on the state of GCC's coroutines support via this mailing list post.

Per the C++ status page, this leaves GCC still to support the atomic compare-and-exchange, completing work on immediate functions, getting the C++ modules support landed, and other odds and ends. But with GCC 10 already being on stage four development, it won't be until GCC 11 next year that we could see complete and production ready C++20 support out of this compiler.
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