GCC 11 Enables Co-Routines Support In C++20 Mode
The recently released GCC 10 compiler landed initial coroutines support for this major C++20 feature but wasn't enabled unless explicitly enabling that option.
Now that GCC 10 is out the door, the C++ coroutines functionality is being enabled by default when running in C++20 mode (std=c++20). Thus for next year's GCC 11 release will be working coroutines functionality when C++20 is enabled. And by then the remaining bits of C++20 support in the GNU Compiler Collection should also be ironed out.
C++ coroutines allow for functions to be suspended and resume their execution later while maintaining their state. Coroutines are one of the major language features of C++20 along with concepts, modules, the spaceship operator, memory model improvements, and a lot more.
The C++20 standard will be formally published in the near future after the technical specification was firmed up earlier this year. GCC 10 has much of C++20 in place while for GCC 11 the remaining items are likely to be addressed, including changes like this week seeing coroutines enabled for -std=c++20.
The C++20 features still being worked on for GCC are outlined on the C++ standards status page. Similarly, for those wondering the C++20 status on the LLVM Clang side, there is its status page.
Now that GCC 10 is out the door, the C++ coroutines functionality is being enabled by default when running in C++20 mode (std=c++20). Thus for next year's GCC 11 release will be working coroutines functionality when C++20 is enabled. And by then the remaining bits of C++20 support in the GNU Compiler Collection should also be ironed out.
C++ coroutines allow for functions to be suspended and resume their execution later while maintaining their state. Coroutines are one of the major language features of C++20 along with concepts, modules, the spaceship operator, memory model improvements, and a lot more.
The C++20 standard will be formally published in the near future after the technical specification was firmed up earlier this year. GCC 10 has much of C++20 in place while for GCC 11 the remaining items are likely to be addressed, including changes like this week seeing coroutines enabled for -std=c++20.
The C++20 features still being worked on for GCC are outlined on the C++ standards status page. Similarly, for those wondering the C++20 status on the LLVM Clang side, there is its status page.
32 Comments