Logo
Articles Compilers Libraries Books MiniBooklets Assembly C++ Rust Go Linux CPU Others Videos
Advertisement

Article by Ayman Alheraki on May 3 2026 11:59 AM

New C++26 Feature in Clang 22.1.4

New C++26 Feature in Clang 22.1.4

 

  • Constexpr Structured Bindings (P2686R5): The headline feature, but it's partially implemented. It currently supports decompositions into arrays and aggregates, but not references to constexpr or the decomposition of tuple-like types.

C++26 Core Language Features Available in Clang 22.1.4

Here is a list of C++26 core language features, what they do, and the Clang version that introduced them, as documented on the official LLVM C++ status page:

FeatureProposalAvailable since ClangReference
Remove undefined behavior from lexingP2621R23.3Page 1 L20-L21
Making non-encodable string literals ill-formedP1854R414Page 1 L21-L22
Unevaluated stringsP2361R618Page 1 L22-L23
Add @, $, and ` to the basic character set | P2558R2 | Yes | Page 1 L23-L24 |   
constexpr cast from void*P2738R117Page 1 L24-L25
On the ignorability of standard attributesP2552R3YesPage 1 L25-L26
User-generated static_assert messagesP2741R317Page 1 L28-L29
Placeholder variables with no nameP2169R418Page 1 L29-L30
Template parameter initializationP2308R118Page 1 L30-L31
Pack IndexingP2662R319Page 1 L32-L33
Remove Deprecated Arithmetic Conversion on EnumerationsP2864R218Page 1 L33-L34
Disallow Binding a Returned Glvalue to a TemporaryP2748R519Page 1 L34-L35
Clarifying rules for brace elision in aggregate initializationP3106R117Page 1 L36-L37
Attributes for Structured BindingsP0609R319Page 1 L37-L38
Module Declarations Shouldn’t be MacrosP3034R123Page 18 L38-L39
Trivial infinite loops are not Undefined BehaviorP2809R319Page 18 L40-L41
= delete("should have a reason");P2573R219Page 18 L43-L44
Variadic friendsP2893R320Page 18 L44-L45
constexpr placement newP2747R220Page 18 L45-L46
Deleting a Pointer to an Incomplete Type Should be Ill-formedP3144R219Page 18 L46-L47
Ordering of constraints involving fold expressionsP2963R319Page 18 L48-L49
Structured binding declaration as a conditionP0963R321Page 18 L49-L50
Remove Deprecated Array ComparisonsP2865R620Page 18 L53-L54
Structured Bindings can introduce a PackP1061R1021Page 18 L54-L55
The Oxford variadic commaP3176R120Page 18 L55-L56
Attaching main to the global moduleP3618R021Page 18 L66-L67

C++26 Library Features (libc++) in Clang 22.1.4

Here are the C++26 library features available in the libc++ that ships with Clang 22.1.4, as listed on cppreference.com:

FeatureProposal(s)libc++ VersionReference
Testing for success or failure of <charconv> functionsP2497R018Page 13 L117-L120
std::text_encoding: text encodings identificationP1885R12, P2862R1(not specified)Page 13 L120-L123
Arithmetic overloads of std::to_string and std::to_wstring use std::formatP2587R3(not specified)Page 13 L124-L128
Type checking format argsP2757R3(not specified)Page 13 L129-L130
Formatting pointersP2510R317 (partial)Page 13 L131-L133
Hashing support for std::chrono value classesP2592R3(not specified)Page 13 L134-L136
std::stringstream from std::string_viewP2495R319Page 20 L170-L171
Interfacing std::bitset with std::string_viewP2697R118Page 20 L171-L174
More constexpr for <cmath> and <complex>P1383R2(not specified)Page 20 L175-L178
New SI prefixes on ratios: std::quecto, std::ronto, std::ronna, std::quettaP2734R017Page 20 L180-L182
std::function_ref: type-erased callable referenceP0792R14, P3961R1(not specified)Page 20 L183-L186
std::copyable_functionP2548R6(not specified)Page 20 L187-L188
std::bind_front, std::bind_back, and std::not_fn to NTTP callablesP2714R1(not specified)Page 20 L189-L196
std::submdspan()P2630R4, P3355R1, P3663R3, P3982R2(not specified)Page 20 L197-L200
Saturation ArithmeticP0543R3, P4052R018Page 21 L226-L229
<debugging>: Debugging supportP2546R5, P2810R416Page 21 L230-L233
<linalg>: A free function linear algebra interface based on the BLASP1673R13, P3050R2, P3222R0, P3371R5(not specified)Page 21 L234-L238
Making assert() macro user friendlyP2264R7YesPage 21 L239
Dynamic format stringsP2918R2, P3953R3(not specified)Page 21 L240-L242

Summary

Clang 22.1.4 supports a wide range of C++26 features, from those introduced many years ago to the latest partial support for constexpr structured bindings. The support spans both core language and library features, with many of them being "Yes" or available in earlier Clang versions. For the most up-to-date status, you can always check the official Clang C++ Support page.

Advertisements

Responsive Counter
General Counter
1286317
Daily Counter
1477