Support latest C++ standard C++23: * [ Working Draft, Standard for Programming Language C++ 2023/n4944](https://open-std.org/JTC1/SC22/WG21/docs/papers/2023/n4944.pdf) * [cppreference/C++23](https://en.cppreference.com/w/cpp/23) ## does not lead to a change in grammar <table> <tr> <td>C++23 feature</td> <td>Paper(s)</td> <td>cxx support</td> </tr> <tr> <td>Narrowing contextual conversions in static_assert and constexpr if</td> <td><a href="https://wg21.link/P1401R5"> P1401R5 </a></td> <td><b>YES</b></td> </tr> <tr> <td>Removing Garbage Collection Support</td> <td><a href="https://wg21.link/P2186R2"> P2186R2 </a></td> <td><b>YES</b></td> </tr> <tr> <td>Make declaration order layout mandated</td> <td><a href="https://wg21.link/P1847R4"> P1847R4 </a></td> <td><b>YES</b></td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/language/lambda#Syntax"> Change scope of lambda trailing-return-type </a></td> <td><a href="https://wg21.link/P2036R3"> P2036R3 </a></td> <td><b>YES</b></td> </tr> <tr> <td>Relaxing some constexpr restrictions</td> <td><a href="https://wg21.link/P2448R2"> P2448R2 </a></td> <td><b>YES</b></td> </tr> <tr> <td>Simpler implicit move</td> <td><a href="https://wg21.link/P2266R3"> P2266R3 </a></td> <td><b>YES</b></td> </tr> <tr> <td>Class template argument deduction from inherited constructors</td> <td><a href="https://wg21.link/P2582R1"> P2582R1 </a></td> <td><b>YES</b></td> </tr> <tr> <td>DR20: consteval needs to propagate up</td> <td><a href="https://wg21.link/P2564R0"> P2564R0 </a></td> <td><b>YES</b></td> </tr> <tr> <td>Extending the lifetime of temporaries in range-based for loop initializer</td> <td><a href="https://wg21.link/P2718R0"> P2718R0 </a></td> <td><b>YES</b></td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/feature_test#Language_features"> DR20: Adjusting the value of feature-test macro __cpp_concepts </a></td> <td><a href="https://wg21.link/P2493R0"> P2493R0 </a></td> <td><b>YES</b></td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/language/types#Defect_reports"> DR98: Relax requirements on wchar_t to match existing practices </a></td> <td><a href="https://wg21.link/P2460R2"> P2460R2 </a></td> <td><b>YES</b></td> </tr> <tr> <td>DR: Using unknown pointers and references in constant expressions</td> <td><a href="https://wg21.link/P2280R4"> P2280R4 </a></td> <td><b>YES</b></td> </tr> <tr> <td>DR20: The Equality Operator You Are Looking For</td> <td><a href="https://wg21.link/P2468R2"> P2468R2 </a></td> <td><b>YES</b></td> </tr> <tr> <td>DR20: char8_t Compatibility and Portability Fix</td> <td><a href="https://wg21.link/P2513R4"> P2513R4 </a></td> <td><b>YES</b></td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/preprocessor/er"> DR: Clarify reportingof diagnostic directives and allow static_assert of non-value-dependent expressions in a template context </a></td> <td><a href="https://cplusplus.github.io/CWG/issues/2518.html">CWG2518</a></td> <td><b>YES</b></td> </tr> </table> ## changes in grammar <table> <tr> <td>C++23 feature</td> <td>Paper(s)</td> <td>cxx support</td> <td>cxx version</td> <td>pull request</td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/preprocessor/error">#warning</a></td> <td><a href="https://wg21.link/P2437R1"> P2437R1 </a></td> <td><b>YES</b></td> <td>v2.0</td> <td>1) #2727</td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/language/translation_phases#Pha"> Support for UTF-8 as a portable source file encoding </a></td> <td><a href="https://wg21.link/P2295R6"> P2295R6 </a></td> <td><b>YES</b></td> <td>v2.0.2</td> <td>1) #2143</td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/preprocessor/conditional"> #elifdef and #elifndef </a></td> <td><a href="https://wg21.link/P2334R1"> P2334R1 </a></td> <td><b>YES</b></td> <td>v2.1.0</td> <td>#2411 #2727</td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/language/if#Consteval_if">if consteval</a></td> <td><a href="https://wg21.link/P1938R3"> P1938R3 </a></td> <td><b>YES</b></td> <td>v2.1.3</td> <td>#2728</td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/language/member_functions#Expli"> Explicit object parameter (deducing this) </a></td> <td><a href="https://wg21.link/P0847R7"> P0847R7 </a></td> <td><b>YES</b></td> <td>v2.1.3</td> <td>#2729</td> </tr> <tr> <td>Extend init-statement (of for loop) to allow alias-declaration</td> <td><a href="https://wg21.link/P2360R0"> P2360R0 </a></td> <td><b>YES</b></td> <td>v2.1.3</td> <td>#2734</td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/language/operators#Array_subscr"> Multidimensional subscript operator </a></td> <td><a href="https://wg21.link/P2128R6"> P2128R6 </a></td> <td><b>YES</b></td> <td>v2.1.3</td> <td>#2733</td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/language/attributes/assume"> Attribute [[assume]] </a></td> <td><a href="https://wg21.link/P1774R8"> P1774R8 </a></td> <td><b>YES</b></td> <td>v2.1.3</td> <td> #2732</td> </tr> <tr> <td>Literal suffix for (signed) size_t </td> <td><a href="https://wg21.link/P0330R8"> P0330R8 </a></td> <td><b>YES</b></td> <td>v2.1.3</td> <td>#2742</td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/language/lambda"> Make () more optional for lambdas </a></td> <td><a href="https://wg21.link/P1102R2"> P1102R2 </a></td> <td><b>YES</b></td> <td>v2.1.3</td> <td>#2736</td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/language/explicit_cast"> auto(x) and auto{x} </a></td> <td><a href="https://wg21.link/P0849R8"> P0849R8 </a></td> <td><b>YES</b></td> <td>v2.1.3</td> <td>#2740</td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/language/lambda">Attributes on lambdas</a></td> <td><a href="https://wg21.link/P2173R1"> P2173R1 </a></td> <td><b>YES</b></td> <td>v2.1.3</td> <td>#2736</td> </tr> <tr> <td>Labels at the end of compound statements</td> <td><a href="https://wg21.link/P2324R2"> P2324R2 </a></td> <td><b>YES</b></td> <td>v.2.1.3</td> <td>#2737</td> </tr> <tr> <td>static operator()</td> <td><a href="https://wg21.link/P1169R4"> P1169R4 </a></td> <td><b>YES</b></td> <td>v2.1.3</td> <td>#2740</td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/types/floating-"> Requirements for optional extended floating-point types </a></td> <td><a href="https://wg21.link/P1467R9"> P1467R9 </a></td> <td><b>YES</b></td> <td>v2.1.3</td> <td>#2743</td> </tr> <tr> <td>static operator[]</td> <td><a href="https://wg21.link/P2589R0"> P2589R0 </a></td> <td><b>YES</b></td> <td>v2.1.3</td> <td>#2740</td> </tr> <tr> <td>Permitting static constexpr variables in constexpr functions=</td> <td><a href="https://wg21.link/P2647R1"> P2647R1 </a></td> <td><b>YES</b></td> <td>v2.1.3</td> <td>#2740</td> </tr> <tr> <td>DR20: Meaningful exports</td> <td><a href="https://wg21.link/P2615R0"> P2615R0 </a></td> <td><b>YES</b></td> <td>v2.1.3</td> <td>#2738</td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/language/attributes#Syntax"> DR11: Allow duplicate attributes </a></td> <td><a href="https://wg21.link/P2156R1"> P2156R1 </a></td> <td><b>YES</b></td> <td>v2.1.3</td> <td>#2740</td> </tr> <tr> <td>Trimming whitespaces before line splicing</td> <td><a href="https://wg21.link/P2223R2"> P2223R2 </a></td> <td><b>YES</b></td> <td>v2.1.3</td> <td>#2749</td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/language/escape"> Delimited escape sequences </a></td> <td><a href="https://wg21.link/P2290R3"> P2290R3 </a></td> <td><b>YES</b></td> <td>v.2.1.3</td> <td>#2744</td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/language/escape#Named_universal"> Named universal character escapes </a></td> <td><a href="https://wg21.link/P2071R2"> P2071R2 </a></td> <td><b>YES</b></td> <td>v.2.1.3</td> <td>#2744</td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/language/conste"> Non-literal variables(and labels and gotos) in constexpr functions </a></td> <td><a href="https://wg21.link/P2242R3"> P2242R3 </a></td> <td>3)</td> <td></td> <td></td> </tr> <tr> <td>Consistent character literal encoding</td> <td><a href="https://wg21.link/P2316R2"> P2316R2 </a></td> <td>3)</td> <td></td> <td></td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/language/charse"> Character sets and encodings </a></td> <td><a href="https://wg21.link/P2314R4"> P2314R4 </a></td> <td>3)</td> <td></td> <td></td> </tr> <tr> <td>Remove non-encodable wide character literals and multicharacter wide character literals</td> <td><a href="https://wg21.link/P2362R3"> P2362R3 </a></td> <td>3)</td> <td></td> <td></td> </tr> <tr> <td>DR: C++ Identifier Syntax using Unicode Standard Annex 31</td> <td><a href="https://wg21.link/P1949R7"> P1949R7 </a></td> <td>3)</td> <td></td> <td></td> </tr> <tr> <td><a href="https://en.cppreference.com/w/cpp/language/string_literal#Concate"> Removing mixed wide string literal concatenation </a></td> <td><a href="https://wg21.link/P2201R1"> P2201R1 </a></td> <td>3)</td> <td></td> <td></td> </tr> </table> ``` 1) already supported in previous versions 2) does not lead to a change in grammar 3) test of the current behavior necessary ```
Support latest C++ standard C++23:
does not lead to a change in grammar
changes in grammar