The State Of C++20 Features In GCC's libstdc++

Written by Michael Larabel in GNU on 12 January 2019 at 07:19 AM EST. 5 Comments
GNU
With GCC 9 being released in just a short time and being now onto the final stage of development, besides fixing regressions the developers are also getting the documentation in order.

As part of getting the documentation squared away for the upcoming GCC 9.1 release, committed today was the documentation showing the status of the C++20 support within their libstdc++ C++ standard library.

Besides the GNU Compiler Collection itself moving along with its preliminary C++20 features, the libstdc++ library has also been working to stay in-step as new functionality gets worked out for this next planned update to the C++ programming language.

As implied by the name, with C++20 not coming out for another year at least, GCC 9.1 obviously won't have full support for it yet with various technical specifications still being discussed. C++20 is bringing many changes like ranges, a revised memory model, potentially modules / coroutines / transactional memory, and other additions.

On the library side, committed today was the current look at libstdc++ support. That new documentation added can be viewed here.

It shows that for GCC 9.1, libstdc++ picked up some library features like string prefix and suffix checking, remove_cvref transformation trait, integral power-of-2 operations, improving the return value of erase-like algorithms, efficient sized delete for variable sized classes, std::is_constant_evaluated(), and other additions.

But a majority of the planned C++20 library technical specifications remain yet to be implemented. Look for more of the C++20 support from the compiler and standard library to be fleshed out for next year's GCC 10 release. The experimental support in GCC 9 can be tapped with the -std=c++2a switch.
Related News
About The Author
Michael Larabel

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, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week