LLVM Clang Now Exposes -std=c++23 Rather Than -std=c++2b

Written by Michael Larabel in LLVM on 4 May 2023 at 04:41 PM EDT. 2 Comments
LLVM
Merged today to LLVM 17 Git is now recognizing -std=c++23 rather than just -std=c++2b for the Clang compiler now that C++23 has been deemed technically complete.

With the ISO C++ Committee having voted that the C++23 standard has reached its technical complete state, LLVM developers have gone ahead and renamed their C++2b standard target to C++23. This is similar to in the past where C++20 was known as C++2a until the language update was ready and with prior ISO C++ standards.

Using -std=c++23 rather than -std=c++2b was made via this commit.

LLVM Clang C++26


The C++23 standard introduces new features such as a stacktrace library based on Boost's stacktrace, conditionally borrowed ranges, the stdatomic.h header for interoperability with C atomics, std::byteswap, std::expected, support for UTF-8 source files is now deemed mandatory, if consteval, attributes on lambdas, and numerous other changes. A convenient look and the current compiler support can be found via cppreference.com.

Moving forward, also issued today was a request for comments that LLVM just go ahead and call its C++26 support "C++26" straight-away without first calling it C++2c. The hope is that it leads to fewer mistakes during the transition periods if -std=c++26 is added right away.
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