From b9c0e590f1fd4ea37da5c2b9b78d8e715c885f56 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 16 May 2023 08:52:25 +0200 Subject: [PATCH] [Clang][NFC] Present language version in descending publication date --- clang/www/cxx_status.html | 1924 +++++++++++++++++++++++---------------------- 1 file changed, 964 insertions(+), 960 deletions(-) diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html index 564c3d6..91706be 100755 --- a/clang/www/cxx_status.html +++ b/clang/www/cxx_status.html @@ -30,45 +30,45 @@

Clang implements the following published and upcoming ISO C++ standards:

+ + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Language StandardFlagAvailable in Clang?
C++2c-std=c++2cPartial
Language StandardFlagAvailable in Clang?
C++98 / C++03-std=c++98Yes (other than export)
C++11-std=c++11Clang 3.3
C++14-std=c++14Clang 3.4
C++17-std=c++17Clang 5
C++20-std=c++20Partial
C++23-std=c++23Partial
C++2c-std=c++2cPartialC++23-std=c++23Partial
C++20-std=c++20Partial
C++17-std=c++17Clang 5
C++14-std=c++14Clang 3.4
C++11-std=c++11Clang 3.3
C++98 / C++03-std=c++98Yes (other than export)
@@ -85,513 +85,735 @@ language.

the "c++" label, as well as mode-specific labels such as "c++11", "c++14", and so on, to track known bugs with Clang's language conformance.

-

C++98 implementation status

+

C++2c implementation status

-

Clang implements all of the ISO C++ 1998 standard - (including the defects addressed in the ISO C++ 2003 standard) - except for export (which was removed in C++11). + +

Clang has support for some of the features of the C++ standard following +C++23, informally referred to as C++26.

-

C++11 implementation status

+

You can use Clang in C++2c mode with the -std=c++2c option.

-

Clang 3.3 and later implement all of the ISO - C++ 2011 standard.

+
+List of features and minimum Clang version with support + + + + + + +
Language FeatureC++26 ProposalAvailable in Clang?
+
-

You can use Clang in C++11 mode with the -std=c++11 -option. Clang's C++11 mode can be used with -libc++ or with gcc's libstdc++.

-
+

C++23 implementation status

+ + +

Clang has support for some of the features of the ISO C++ 2023 standard.

+ +

You can use Clang in C++23 mode with the -std=c++23 option.

+ +
List of features and minimum Clang version with support - + - - - - - - - - - + - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - - - - - + + + - - - + + + - - - + + + - - - + + + + - - - + + + - - - + + - - - - - - - - + + + - - - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + - - - + + + - - - + + + - - - - - - - - + + + + + - - - - - - - - + + + - - - + + + - - - + + + - - - - - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + - - - + + + - - - + + + - - - + + + - - - - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + - - - + + + - - - - - - - - + + + - - - + + + - - - + + + + - - - + + + +
Language FeatureC++11 ProposalC++23 Proposal Available in Clang?
Rvalue referencesN2118Clang 2.9
P1825R0 (DR)Clang 13
    Rvalue references for *thisN2439Clang 2.9Literal suffix uz, z for size_t, ssize_tP0330R8Clang 13
Initialization of class objects by rvaluesN1610Clang 2.9Make () in lambdas optional in all casesP1102R2Clang 13
Non-static data member initializersN2756Clang 3.0Simpler implicit moveP2266R1Clang 13
Variadic templatesN2242Clang 2.9if constevalP1938R3Clang 14
    Extending variadic template template parametersN2555Clang 2.9Allow duplicate attributesP2156R1Clang 13
Initializer listsN2672Clang 3.1Narrowing contextual conversions to boolP1401R5Clang 14
P1009R2 (DR)Clang 9
P1957R2 (DR)Clang 11
Static assertionsN1720Clang 2.9Trimming whitespaces before line splicingP2223R2Yes
auto-typed variablesN1984Clang 2.9Make declaration order layout mandatedP1874R4Yes
    Multi-declarator autoN1737Clang 2.9C++ identifier syntax using UAX 31P1949R7Clang 14
    Removal of auto as a storage-class specifierN2546Clang 2.9Mixed string literal concatenationP2201R1Yes
    New function declarator syntaxN2541Clang 2.9Deducing thisP0847R7No
Lambda expressionsN2927Clang 3.1P2797R0No
P0588R1 (DR)No
Declared type of an expressionN2343Clang 2.9Change scope of lambda trailing-return-typeP2036R3Clang 17
    Incomplete return typesN3276Clang 3.1P2579R0
Right angle bracketsN1757Clang 2.9Multidimensional subscript operatorP2128R6Clang 15
Default template arguments for function templatesDR226Clang 2.9Non-literal variables (and labels and gotos) in constexpr functionsP2242R3Clang 15
Solving the SFINAE problem for expressionsDR339Clang 2.9Character encoding of diagnostic textP2246R1Yes
Alias templatesN2258Clang 3.0Character sets and encodingsP2314R4Yes
Extern templatesN1987Clang 2.9Consistent character literal encodingP2316R2Yes
Null pointer constantN2431Clang 3.0Add support for preprocessing directives elifdef and elifndefP2334R1Clang 13
Strongly-typed enumsN2347Clang 2.9Extend init-statement to allow alias-declarationP2360R0Clang 14
Forward declarations for enumsN2764 -
DR1206
Clang 3.1auto(x): decay-copy in the languageP0849R8Clang 15
Standardized attribute syntaxN2761Clang 3.3 (1)Attributes on Lambda-ExpressionsP2173R1Clang 13
Generalized constant expressionsN2235Clang 3.1constexpr for <cmath> and <cstdlib>P0533R9No
P0859R0 (DR)Clang 8
Alignment supportN2341Clang 3.3Type trait to determine if a reference binds to a temporaryP2255R2 +
Partial + Clang provides a __reference_binds_to_temporary type trait + builtin, with which the library facility can be partially implemented. + Both __reference_constructs_from_temporary and + __reference_converts_from_temporary builtins should be + provided, following the normal cross-vendor convention to implement + traits requiring compiler support directly. +
Conditionally-support behaviorN1627Clang 2.9
Changing undefined behavior into diagnosable errorsN1727Clang 2.9The Equality Operator You Are Looking ForP2468R2Clang 16
Delegating constructorsN1986Clang 3.0De-deprecating volatile compound operationsP2327R1Clang 15
Inheriting constructorsN2540Clang 3.3Support for #warningP2437R1Yes
P0136R1 (DR)Clang 3.9
Explicit conversion operatorsN2437Clang 3.0Remove non-encodable wide character literals and multicharacter wide character literalsP2362R3Clang 14
New character typesN2249Clang 2.9Labels at the end of compound statementsP2324R2Clang 16
Unicode string literalsN2442Clang 3.0Delimited escape sequencesP2290R3Clang 15
Raw string literalsN2442Clang 3.0Named universal character escapesP2071R2Clang 15
Universal character names in literalsN2170Clang 3.1Relaxing some constexpr restrictionsP2448R2 +
Clang 17 (Partial) + We do not support outside of defaulted special memeber functions the change that constexpr functions no + longer have to be constexpr compatible but rather support a less restricted requirements for constexpr + functions. Which include allowing non-literal types as return values and parameters, allow calling of + non-constexpr functions and constructors. +
User-defined literalsN2765Clang 3.1Using unknown pointers and references in constant expressionsP2280R4No
Standard Layout TypesN2342Clang 3.0static operator()P1169R4Clang 16
Defaulted functionsN2346Clang 3.0Extended floating-point types and standard namesP1467R9No
P1286R2 (DR)Clang 9
Deleted functionsN2346Clang 2.9Class template argument deduction from inherited constructorsP2582R1No
Extended friend declarationsN1791Clang 2.9Portable assumptionsP1774R8No
Extending sizeofN2253 -
DR850
Clang 3.1Support for UTF-8 as a portable source file encodingP2295R6Clang 15
Inline namespacesN2535Clang 2.9char8_t Compatibility and Portability FixP2513R3Clang 16
Unrestricted unionsN2544Clang 3.1Relax requirements on wchar_t to match existing practicesP2460R2Yes
Local and unnamed types as template argumentsN2657Clang 2.9Explicit lifetime managementP2590R2No
Range-based forN2930Clang 3.0static operator[]P2589R1Clang 16
P0962R1 (DR)Clang 8
Explicit virtual overridesN2928 -
N3206 -
N3272
Clang 3.0Permitting static constexpr variables in constexpr functionsP2647R1Clang 16
Minimal support for garbage collection and reachability-based leak detectionN2670N/A (2)consteval needs to propagate upP2564R3 (DR)No
Allowing move constructors to throw [noexcept]N3050Clang 3.0Lifetime extension in range-based for loopsP2718R0No
Defining move special member functionsN3053Clang 3.0Referencing The Unicode StandardP2736R2Yes
+
- - Concurrency - - - Sequence points - N2239 - Clang 3.3 - - - Atomic operations - N2427 - Clang 3.1 - - - Strong Compare and Exchange - N2748 - Clang 3.1 (3) - - - Bidirectional Fences - N2752 - Clang 3.1 - +

C++20 implementation status

+ +

Clang has support for some of the features of the +ISO C++ 2020 standard.

+ +

You can use Clang in C++20 mode with the -std=c++20 option +(use -std=c++2a in Clang 9 and earlier).

+ +
+List of features and minimum Clang version with support + + + + + + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + - - - + + + - - - - - - - + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - + + + - - - + + + -
Language FeatureC++20 ProposalAvailable in Clang?
Memory modelN2429Clang 3.2Default member initializers for bit-fieldsP0683R1Clang 6
Data-dependency ordering: atomics and memory modelN2664Clang 3.2 (4)const&-qualified pointers to membersP0704R1Clang 6
Propagating exceptionsN2179Clang 2.9Allow lambda-capture [=, this]P0409R2Clang 6
Allow atomics use in signal handlersN2547Clang 3.1__VA_OPT__ for preprocessor comma elisionP0306R4Clang 6
P1042R1Clang 9
Thread-local storageN2659Clang 3.3 (5)Designated initializersP0329R4Clang 10
Dynamic initialization and destruction with concurrencyN2660Clang 2.9
C99 Features in C++11template-parameter-list for generic lambdasP0428R2Clang 9
__func__ predefined identifierN2340Clang 2.9
ConceptsP0734R0Clang 10
P0857R0Clang 16
P1084R2Clang 10
P1141R2
P0848R3 +
+ Clang 16 (Partial) + Because of other concepts implementation deficits, the __cpp_concepts macro is not yet set to 202002L. + Also, the related defect reports DR1496 and + DR1734 are not yet implemented. Accordingly, deleted + special member functions are treated as eligible even though they shouldn't be. +
+
P1616R1Clang 10
P1452R2
P1972R0Clang 10
P1980R0
P2103R0
P2493R0
P2092R0Clang 16
P2113R0Clang 16
C99 preprocessorN1653Clang 2.9Range-based for statements with initializerP0614R1Clang 8
long longN1811Clang 2.9ADL and function templates that are not visibleP0846R0Clang 9
Extended integral typesN1988N/A (6)const mismatch with defaulted copy constructorP0641R2Clang 8
- -

-(1): The [[carries_dependency]] attribute -has no effect.
-(2): No compiler changes are required for an implementation -such as Clang that does not provide garbage collection.
-(3): All compare-exchange operations are emitted as -strong compare-exchanges.
-(4): memory_order_consume is lowered to -memory_order_acquire.
-(5): thread_local support -requires a C++ runtime library providing __cxa_thread_atexit, such -as libc++abi 3.6 or later, -or libsupc++ 4.8 or later.
-(6): No compiler changes are required for an implementation -such as Clang that does not provide any extended integer types. -__int128 is not treated as an extended integer type, -because changing intmax_t would be an ABI-incompatible -change. -

-
- -

C++14 implementation status

- -

Clang 3.4 and later implement all of the ISO - C++ 2014 standard.

- -

You can use Clang in C++14 mode with the -std=c++14 option -(use -std=c++1y in Clang 3.4 and earlier).

- -
-List of features and minimum Clang version with support - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - + + + - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + + - - - + + + + + + - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - + + + -
Language FeatureC++14 ProposalAvailable in Clang?
Tweak to certain C++ contextual conversionsN3323Clang 3.4Consistent comparison (operator<=>)P0515R3Clang 10
P0905R1
P1120R0
P1185R2
P1186R3
P1630R1
P1946R0
P1959R0
P2002R1Partial
P2085R0Clang 14
Binary literalsN3472Clang 2.9Access checking on specializationsP0692R1Clang 14
decltype(auto)N3638Clang 3.3Default constructible and assignable stateless lambdasP0624R2Clang 8
Return type deduction for normal functionsClang 3.4Lambdas in unevaluated contextsP0315R4Clang 17
Initialized lambda capturesN3648Clang 3.4[[no_unique_address]] attributeP0840R2Clang 9
Generic lambdasN3649Clang 3.4[[likely]] and [[unlikely]] attributesP0479R5Clang 12
Variable templatesN3651Clang 3.4typename optional in more contextsP0634R3Clang 16
Relaxing requirements on constexpr functionsN3652Clang 3.4Pack expansion in lambda init-captureP0780R2Clang 9
Member initializers and aggregatesN3653Clang 3.3Class types as non-type template parametersP0732R2Partial
P1907R1
Clarifying memory allocationN3664Clang 3.4Destroying operator deleteP0722R3Clang 6
[[deprecated]] attributeN3760Clang 3.4Relaxations of constexpr restrictionsP1064R0Clang 9
P1002R1Clang 8
P1327R1Clang 9
P1330R0
P1331R2Clang 10
P1668R1
P0784R7
Single quotation mark as digit separatorN3781Clang 3.4Prohibit aggregates with user-declared constructorsP1008R1Clang 8
C++ Sized DeallocationN3778Clang 3.4 (7)Feature test macrosP0941R2(see below)
- -

-(7): In Clang 3.7 and later, sized deallocation is only enabled -if the user passes the -fsized-deallocation flag. The user must -supply definitions of the sized deallocation functions, either by providing them -explicitly or by using a C++ standard library that does. libstdc++ -added these functions in version 5.0, and libc++ added them in -version 3.7. - -

-
- + + explicit(bool) + P0892R2 + Clang 9 + + + + Signed integers are two's complement + P1236R1 + Clang 9 + + + char8_t + P0482R6 + Clang 7 (11) + + + Immediate functions (consteval) + P1073R3 + +
Clang 15 (Partial) + Clang still incorrectly defers some consteval executions to runtime, + resulting in CodeGen crashes. Additionally, Clang does not properly + handle default arguments in consteval functions under all + circumstances. +
+ + + + P1937R2 + Clang 14 + + + std::is_constant_evaluated + P0595R2 + Clang 9 + + + Nested inline namespaces + P1094R2 + Clang 8 + + + + Structured binding extensions + P1091R3 + Clang 16 + + + P1381R1 + + + Stronger Unicode requirements + P1041R4 + Yes + + + P1139R2 + + + Parenthesized initialization of aggregates + P0960R3 + No + + + P1975R0 + + + Modules + P1103R3 + Clang 15 + + + P1766R1 (DR) + Clang 11 + + + P1811R0 + No + + + P1703R1 + Subsumed by P1857 + + + P1874R1 + Clang 15 + + + P1979R0 + No + + + P1779R3 + Clang 15 + + + P1857R3 + No + + + P2115R0 + Partial + + + P1815R2 + Partial + + + P2615R1 (DR) + No + + + P2788R0 (DR) + No + + + Coroutines + P0912R5 + +
Partial + Fully supported on all targets except Windows, which + still has some stability and ABI issues. +
+ + + + Deprecate a[b,c] + P1161R3 + Clang 9 + + + Deprecate some problematic uses of volatile + P1152R4 + Clang 10 + + + [[nodiscard("with reason")]] + P1301R4 + Clang 9 + + + using enum + P1099R5 + Clang 13 + + + Class template argument deduction for aggregates + P1816R0 + No + + + P2082R1 + + + Class template argument deduction for alias templates + P1814R0 + No + + + Permit conversions to arrays of unknown bound + P0388R4 + Clang 14 + + + constinit + P1143R2 + Clang 10 + + + + Pseudo-destructors end object lifetimes + P0593R6 (DR) + Clang 11 + + + More implicit moves + P1825R0 (DR) + Clang 13 + + + +

+(11): Prior to Clang 8, this feature is not enabled by +-std=c++20, but can be enabled with -fchar8_t. + +

+
+ +

C++17 implementation status

Clang 5 and later implement all the features of the @@ -858,731 +1080,513 @@ code. This issue is expected to be rectified soon.

-

C++20 implementation status

+

C++14 implementation status

-

Clang has support for some of the features of the -ISO C++ 2020 standard.

+

Clang 3.4 and later implement all of the ISO + C++ 2014 standard.

-

You can use Clang in C++20 mode with the -std=c++20 option -(use -std=c++2a in Clang 9 and earlier).

+

You can use Clang in C++14 mode with the -std=c++14 option +(use -std=c++1y in Clang 3.4 and earlier).

-
+
List of features and minimum Clang version with support - + - - - - + + + - - - + + + - - - + + + - - - + + - - - - - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - + + + - - - - - - - + + + - - - + + + - - - - + + + - - - - - - + + + - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
Language FeatureC++20 ProposalC++14 Proposal Available in Clang?
Default member initializers for bit-fieldsP0683R1Clang 6Tweak to certain C++ contextual conversionsN3323Clang 3.4
const&-qualified pointers to membersP0704R1Clang 6Binary literalsN3472Clang 2.9
Allow lambda-capture [=, this]P0409R2Clang 6decltype(auto)N3638Clang 3.3
__VA_OPT__ for preprocessor comma elisionP0306R4Clang 6Return type deduction for normal functionsClang 3.4
P1042R1Clang 9
Designated initializersP0329R4Clang 10Initialized lambda capturesN3648Clang 3.4
template-parameter-list for generic lambdasP0428R2Clang 9Generic lambdasN3649Clang 3.4
ConceptsP0734R0Clang 10
P0857R0Clang 16
P1084R2Clang 10
P1141R2
P0848R3 -
- Clang 16 (Partial) - Because of other concepts implementation deficits, the __cpp_concepts macro is not yet set to 202002L. - Also, the related defect reports DR1496 and - DR1734 are not yet implemented. Accordingly, deleted - special member functions are treated as eligible even though they shouldn't be. -
-
P1616R1Clang 10
P1452R2
P1972R0Clang 10
P1980R0
P2103R0
P2493R0
P2092R0Clang 16
P2113R0Clang 16
Range-based for statements with initializerP0614R1Clang 8
ADL and function templates that are not visibleP0846R0Clang 9
const mismatch with defaulted copy constructorP0641R2Clang 8
Consistent comparison (operator<=>)P0515R3Clang 10
P0905R1
P1120R0
P1185R2
P1186R3
P1630R1
P1946R0
P1959R0
P2002R1Partial
P2085R0Clang 14
Access checking on specializationsP0692R1Clang 14
Default constructible and assignable stateless lambdasP0624R2Clang 8
Lambdas in unevaluated contextsP0315R4Clang 17
[[no_unique_address]] attributeP0840R2Clang 9
[[likely]] and [[unlikely]] attributesP0479R5Clang 12
typename optional in more contextsP0634R3Clang 16
Pack expansion in lambda init-captureP0780R2Clang 9
Class types as non-type template parametersP0732R2Partial
P1907R1
Destroying operator deleteP0722R3Clang 6
Relaxations of constexpr restrictionsP1064R0Clang 9
P1002R1Clang 8
P1327R1Clang 9
P1330R0
P1331R2Clang 10
P1668R1
P0784R7
Prohibit aggregates with user-declared constructorsP1008R1Clang 8
Feature test macrosP0941R2(see below)
Variable templatesN3651Clang 3.4
explicit(bool)P0892R2Clang 9
Signed integers are two's complementP1236R1Clang 9
char8_tP0482R6Clang 7 (11)
Immediate functions (consteval)P1073R3 -
Clang 15 (Partial) - Clang still incorrectly defers some consteval executions to runtime, - resulting in CodeGen crashes. Additionally, Clang does not properly - handle default arguments in consteval functions under all - circumstances. -
-
Relaxing requirements on constexpr functionsN3652Clang 3.4
P1937R2Clang 14
std::is_constant_evaluatedP0595R2Clang 9Member initializers and aggregatesN3653Clang 3.3
Nested inline namespacesP1094R2Clang 8Clarifying memory allocationN3664Clang 3.4
Structured binding extensionsP1091R3Clang 16[[deprecated]] attributeN3760Clang 3.4
P1381R1
Stronger Unicode requirementsP1041R4YesSingle quotation mark as digit separatorN3781Clang 3.4
P1139R2
Parenthesized initialization of aggregatesP0960R3No
P1975R0
ModulesP1103R3Clang 15C++ Sized DeallocationN3778Clang 3.4 (7)
P1766R1 (DR)Clang 11
P1811R0No
P1703R1Subsumed by P1857
P1874R1Clang 15
P1979R0No
P1779R3Clang 15
P1857R3No
P2115R0Partial
P1815R2Partial
P2615R1 (DR)No
P2788R0 (DR)No
+ +

+(7): In Clang 3.7 and later, sized deallocation is only enabled +if the user passes the -fsized-deallocation flag. The user must +supply definitions of the sized deallocation functions, either by providing them +explicitly or by using a C++ standard library that does. libstdc++ +added these functions in version 5.0, and libc++ added them in +version 3.7. + +

+
+ +

C++11 implementation status

+ +

Clang 3.3 and later implement all of the ISO + C++ 2011 standard.

+ +

You can use Clang in C++11 mode with the -std=c++11 +option. Clang's C++11 mode can be used with +libc++ or with gcc's libstdc++.

+ +
+List of features and minimum Clang version with support + + + + + + + + + + + + + + + - - - + + + - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + + + + + + - - - + + + - - - + + + - - - + + + - - - - + + + - - - + + + -
Language FeatureC++11 ProposalAvailable in Clang?
Rvalue referencesN2118Clang 2.9
P1825R0 (DR)Clang 13
CoroutinesP0912R5 -
Partial - Fully supported on all targets except Windows, which - still has some stability and ABI issues. -
    Rvalue references for *thisN2439Clang 2.9
Deprecate a[b,c]P1161R3Clang 9Initialization of class objects by rvaluesN1610Clang 2.9
Deprecate some problematic uses of volatileP1152R4Clang 10Non-static data member initializersN2756Clang 3.0
[[nodiscard("with reason")]]P1301R4Clang 9Variadic templatesN2242Clang 2.9
using enumP1099R5Clang 13    Extending variadic template template parametersN2555Clang 2.9
Class template argument deduction for aggregatesP1816R0NoInitializer listsN2672Clang 3.1
P2082R1
P1009R2 (DR)Clang 9
P1957R2 (DR)Clang 11
Class template argument deduction for alias templatesP1814R0NoStatic assertionsN1720Clang 2.9
Permit conversions to arrays of unknown boundP0388R4Clang 14auto-typed variablesN1984Clang 2.9
constinitP1143R2Clang 10    Multi-declarator autoN1737Clang 2.9
Pseudo-destructors end object lifetimesP0593R6 (DR)Clang 11    Removal of auto as a storage-class specifierN2546Clang 2.9
More implicit movesP1825R0 (DR)Clang 13    New function declarator syntaxN2541Clang 2.9
- -

-(11): Prior to Clang 8, this feature is not enabled by --std=c++20, but can be enabled with -fchar8_t. - -

-
- -

C++23 implementation status

- - -

Clang has support for some of the features of the ISO C++ 2023 standard.

- -

You can use Clang in C++23 mode with the -std=c++23 option.

- -
-List of features and minimum Clang version with support - - - - - - - - - - - + + + - + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + - - + + + - - - + + + + + + + + - + + + - - - + + + - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + - - - + + + - - - - + + + - - - + + + - - - - + + + - - - - + + + - - - + + + - - - + + + + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + + + + - - - + + + - - - + + + - - - + + + - - - - + + +
Language FeatureC++23 ProposalAvailable in Clang?
Literal suffix uz, z for size_t, ssize_tP0330R8Clang 13Lambda expressionsN2927Clang 3.1
P0588R1 (DR)No
Make () in lambdas optional in all casesP1102R2Clang 13Declared type of an expressionN2343Clang 2.9
Simpler implicit moveP2266R1Clang 13    Incomplete return typesN3276Clang 3.1
if constevalP1938R3Clang 14Right angle bracketsN1757Clang 2.9
Allow duplicate attributesP2156R1Clang 13Default template arguments for function templatesDR226Clang 2.9
Narrowing contextual conversions to boolP1401R5Clang 14Solving the SFINAE problem for expressionsDR339Clang 2.9
Trimming whitespaces before line splicingP2223R2YesAlias templatesN2258Clang 3.0
Make declaration order layout mandatedP1874R4YesExtern templatesN1987Clang 2.9
C++ identifier syntax using UAX 31P1949R7Clang 14Null pointer constantN2431Clang 3.0
Mixed string literal concatenationP2201R1YesStrongly-typed enumsN2347Clang 2.9
Deducing thisP0847R7NoForward declarations for enumsN2764 +
DR1206
Clang 3.1
P2797R0NoStandardized attribute syntaxN2761Clang 3.3 (1)
Change scope of lambda trailing-return-typeP2036R3Clang 17Generalized constant expressionsN2235Clang 3.1
P0859R0 (DR)Clang 8
P2579R0Alignment supportN2341Clang 3.3
Multidimensional subscript operatorP2128R6Clang 15Conditionally-support behaviorN1627Clang 2.9
Non-literal variables (and labels and gotos) in constexpr functionsP2242R3Clang 15Changing undefined behavior into diagnosable errorsN1727Clang 2.9
Character encoding of diagnostic textP2246R1YesDelegating constructorsN1986Clang 3.0
Inheriting constructorsN2540Clang 3.3
P0136R1 (DR)Clang 3.9
Explicit conversion operatorsN2437Clang 3.0
New character typesN2249Clang 2.9
Unicode string literalsN2442Clang 3.0
Raw string literalsN2442Clang 3.0
Character sets and encodingsP2314R4YesUniversal character names in literalsN2170Clang 3.1
Consistent character literal encodingP2316R2YesUser-defined literalsN2765Clang 3.1
Add support for preprocessing directives elifdef and elifndefP2334R1Clang 13Standard Layout TypesN2342Clang 3.0
Extend init-statement to allow alias-declarationP2360R0Clang 14Defaulted functionsN2346Clang 3.0
P1286R2 (DR)Clang 9
auto(x): decay-copy in the languageP0849R8Clang 15Deleted functionsN2346Clang 2.9
Attributes on Lambda-ExpressionsP2173R1Clang 13Extended friend declarationsN1791Clang 2.9
constexpr for <cmath> and <cstdlib>P0533R9NoExtending sizeofN2253 +
DR850
Clang 3.1
Type trait to determine if a reference binds to a temporaryP2255R2 -
Partial - Clang provides a __reference_binds_to_temporary type trait - builtin, with which the library facility can be partially implemented. - Both __reference_constructs_from_temporary and - __reference_converts_from_temporary builtins should be - provided, following the normal cross-vendor convention to implement - traits requiring compiler support directly. -
Inline namespacesN2535Clang 2.9
The Equality Operator You Are Looking ForP2468R2Clang 16Unrestricted unionsN2544Clang 3.1
De-deprecating volatile compound operationsP2327R1Clang 15Local and unnamed types as template argumentsN2657Clang 2.9
Support for #warningP2437R1YesRange-based forN2930Clang 3.0
P0962R1 (DR)Clang 8
Remove non-encodable wide character literals and multicharacter wide character literalsP2362R3Clang 14Explicit virtual overridesN2928 +
N3206 +
N3272
Clang 3.0
Labels at the end of compound statementsP2324R2Clang 16Minimal support for garbage collection and reachability-based leak detectionN2670N/A (2)
Delimited escape sequencesP2290R3Clang 15Allowing move constructors to throw [noexcept]N3050Clang 3.0
Named universal character escapesP2071R2Clang 15Defining move special member functionsN3053Clang 3.0
Relaxing some constexpr restrictionsP2448R2 -
Clang 17 (Partial) - We do not support outside of defaulted special memeber functions the change that constexpr functions no - longer have to be constexpr compatible but rather support a less restricted requirements for constexpr - functions. Which include allowing non-literal types as return values and parameters, allow calling of - non-constexpr functions and constructors. -
Concurrency
Using unknown pointers and references in constant expressionsP2280R4NoSequence pointsN2239Clang 3.3
static operator()P1169R4Clang 16Atomic operationsN2427Clang 3.1
Extended floating-point types and standard namesP1467R9NoStrong Compare and ExchangeN2748Clang 3.1 (3)
Class template argument deduction from inherited constructorsP2582R1NoBidirectional FencesN2752Clang 3.1
Portable assumptionsP1774R8NoMemory modelN2429Clang 3.2
Support for UTF-8 as a portable source file encodingP2295R6Clang 15Data-dependency ordering: atomics and memory modelN2664Clang 3.2 (4)
char8_t Compatibility and Portability FixP2513R3Clang 16Propagating exceptionsN2179Clang 2.9
Relax requirements on wchar_t to match existing practicesP2460R2YesAllow atomics use in signal handlersN2547Clang 3.1
Explicit lifetime managementP2590R2NoThread-local storageN2659Clang 3.3 (5)
static operator[]P2589R1Clang 16Dynamic initialization and destruction with concurrencyN2660Clang 2.9
C99 Features in C++11
Permitting static constexpr variables in constexpr functionsP2647R1Clang 16__func__ predefined identifierN2340Clang 2.9
consteval needs to propagate upP2564R3 (DR)NoC99 preprocessorN1653Clang 2.9
Lifetime extension in range-based for loopsP2718R0Nolong longN1811Clang 2.9
Referencing The Unicode StandardP2736R2YesExtended integral typesN1988N/A (6)
-
-

C++2c implementation status

+

+(1): The [[carries_dependency]] attribute +has no effect.
+(2): No compiler changes are required for an implementation +such as Clang that does not provide garbage collection.
+(3): All compare-exchange operations are emitted as +strong compare-exchanges.
+(4): memory_order_consume is lowered to +memory_order_acquire.
+(5): thread_local support +requires a C++ runtime library providing __cxa_thread_atexit, such +as libc++abi 3.6 or later, +or libsupc++ 4.8 or later.
+(6): No compiler changes are required for an implementation +such as Clang that does not provide any extended integer types. +__int128 is not treated as an extended integer type, +because changing intmax_t would be an ABI-incompatible +change. +

+
- -

Clang has support for some of the features of the C++ standard following -C++23, informally referred to as C++26.

-

You can use Clang in C++2c mode with the -std=c++2c option.

+

C++98 implementation status

-
-List of features and minimum Clang version with support - - - - - - -
Language FeatureC++26 ProposalAvailable in Clang?
-
+

Clang implements all of the ISO C++ 1998 standard + (including the defects addressed in the ISO C++ 2003 standard) + except for export (which was removed in C++11).

Defect reports

-- 2.7.4