GCC 11 Will Let You Use -std=c++23 But Without Turning On Any New Features
Written by Michael Larabel in GNU on 27 January 2021 at 03:24 AM EST. 8 Comments
GNU --
A late change to GCC 11 is recognizing the -std=c++23 compiler option but without actually enabling any new features of this next major version of the C++ programming language.

It was just in September that the C++20 draft was approved as the latest major update to the C++ programming language. The GNU Compiler Collection has near complete coverage of C++20 with still lacking bits of the modules implementation. But while the next major iteration of C++ is still being figured out, GCC 11 will at least honor the compiler flag of "-std=c++23" or "-std=c++2b" but without actually enabling any new functionality over C++20. This is mainly for helping projects that will eventually default to using that flag but will still build cleanly with C++20 level functionality in the upcoming GCC 11 compiler release.

C++23 is expected to bring a more modular standard library, coroutines in the standard library, standardized networking features, a stacktrace library, and more still to be determined. It will be interesting to see what all comes of C++23 and if it ends up being postponed at all with the C++ planning meetings so far being derailed by the pandemic.

In any case, this commit on Tuesday now adds support for -std=c++23 to at least lay the basic groundwork for this next C++ version. GCC 11 stable should be out around the start of the next quarter if their usual release timing keeps up.
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