1<!DOCTYPE html> 2<html> 3<head> 4 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 5 <title>Clang - C++20, C++17, C++14, C++11 and C++98 Status</title> 6 <link type="text/css" rel="stylesheet" href="menu.css"> 7 <link type="text/css" rel="stylesheet" href="content.css"> 8 <style type="text/css"> 9 .none { background-color: #FFCCCC } 10 .partial { background-color: #FFE0B0 } 11 .unreleased { background-color: #FFFF99 } 12 .full { background-color: #CCFF99 } 13 .na { background-color: #DDDDDD } 14 :target { background-color: #FFFFBB; outline: #DDDD55 solid thin; } 15 th { background-color: #FFDDAA } 16 td { vertical-align: middle } 17 tt { white-space: nowrap } 18 </style> 19</head> 20<body> 21 22<!--#include virtual="menu.html.incl"--> 23 24<div id="content"> 25 26<!--*************************************************************************--> 27<h1>C++ Support in Clang</h1> 28<!--*************************************************************************--> 29 30<p>Clang fully implements all published ISO C++ standards 31(<a href="#cxx98">C++98 / C++03</a>, 32<a href="#cxx11">C++11</a>, 33<a href="#cxx14">C++14</a>, and 34<a href="#cxx17">C++17</a>), and some of the upcoming <a 35href="#cxx20">C++20</a> standard. 36 37<p>The Clang community is continually striving to improve C++ standards 38compliance between releases by submitting and tracking <a 39href="cxx_dr_status.html">C++ Defect Reports</a> and implementing resolutions 40as they become available.</p> 41 42<p>Experimental work is also under way to implement <a href="#ts">C++ Technical 43Specifications</a> that will help drive the future of the C++ programming 44language.</p> 45 46<p>The <a href="https://bugs.llvm.org/">LLVM bug tracker</a> contains Clang 47C++ components that track known bugs with Clang's language conformance in 48each language mode.</p> 49 50<h2 id="cxx98">C++98 implementation status</h2> 51 52<p>Clang implements all of the ISO C++ 1998 standard 53 (including the defects addressed in the ISO C++ 2003 standard) 54 except for <tt>export</tt> (which was removed in C++11). 55 56<h2 id="cxx11">C++11 implementation status</h2> 57 58<p>Clang 3.3 and later implement all of the <a 59 href="https://www.iso.org/standard/50372.html">ISO 60 C++ 2011 standard</a>. 61 62<p>By default, Clang builds C++ code according to the C++98 standard, with many 63C++11 features accepted as extensions. You can use Clang in C++11 mode with the 64<code>-std=c++11</code> option. Clang's C++11 mode can be used 65with <a href="https://libcxx.llvm.org/">libc++</a> or with gcc's libstdc++. 66 67<details> 68<summary>List of features and minimum Clang version with support</summary> 69 70<table width="689" border="1" cellspacing="0"> 71 <tr> 72 <th>Language Feature</th> 73 <th>C++11 Proposal</th> 74 <th>Available in Clang?</th> 75 </tr> 76 <tr> 77 <td rowspan="2">Rvalue references</td> 78 <td><a href="https://wg21.link/n2118">N2118</a></td> 79 <td class="full" align="center">Clang 2.9</td> 80 <tr> <!-- from Kona 2019--> 81 <td><a href="https://wg21.link/p1825r0">P1825R0</a> (<a href="#dr">DR</a>)</td> 82 <td class="none" align="center">No</td> 83 </tr> 84 </tr> 85 <tr> 86 <td> Rvalue references for <code>*this</code></td> 87 <td><a href="https://wg21.link/n2439">N2439</a></td> 88 <td class="full" align="center">Clang 2.9</td> 89 </tr> 90 <tr> 91 <td>Initialization of class objects by rvalues</td> 92 <td><a href="https://wg21.link/n1610">N1610</a></td> 93 <td class="full" align="center">Clang 2.9</td> 94 </tr> 95 <tr> 96 <td>Non-static data member initializers</td> 97 <td><a href="https://wg21.link/n2756">N2756</a></td> 98 <td class="full" align="center">Clang 3.0</td> 99 </tr> 100 <tr> 101 <td>Variadic templates</td> 102 <td><a href="https://wg21.link/n2242">N2242</a></td> 103 <td class="full" align="center">Clang 2.9</td> 104 </tr> 105 <tr> 106 <td> Extending variadic template template parameters</td> 107 <td><a href="https://wg21.link/n2555">N2555</a></td> 108 <td class="full" align="center">Clang 2.9</td> 109 </tr> 110 <tr> 111 <td rowspan="3">Initializer lists</td> 112 <td><a href="https://wg21.link/n2672">N2672</a></td> 113 <td class="full" align="center">Clang 3.1</td> 114 </tr> 115 <tr> <!-- from Kona 2019--> 116 <td><a href="https://wg21.link/p1009r2">P1009R2</a> (<a href="#dr">DR</a>)</td> 117 <td class="full" align="center">Clang 9</td> 118 </tr> 119 <tr> <!-- from Prague--> 120 <td><a href="https://wg21.link/p1957r2">P1957R2</a> (<a href="#dr">DR</a>)</td> 121 <td class="unreleased" align="center">Clang 11</td> 122 </tr> 123 <tr> 124 <td>Static assertions</td> 125 <td><a href="https://wg21.link/n1720">N1720</a></td> 126 <td class="full" align="center">Clang 2.9</td> 127 </tr> 128 <tr> 129 <td><code>auto</code>-typed variables</td> 130 <td><a href="https://wg21.link/n1984">N1984</a></td> 131 <td class="full" align="center">Clang 2.9</td> 132 </tr> 133 <tr> 134 <td> Multi-declarator <code>auto</code></td> 135 <td><a href="https://wg21.link/n1737">N1737</a></td> 136 <td class="full" align="center">Clang 2.9</td> 137 </tr> 138 <tr> 139 <td> Removal of auto as a storage-class specifier</td> 140 <td><a href="https://wg21.link/n2546">N2546</a></td> 141 <td class="full" align="center">Clang 2.9</td> 142 </tr> 143 <tr> 144 <td> New function declarator syntax</td> 145 <td><a href="https://wg21.link/n2541">N2541</a></td> 146 <td class="full" align="center">Clang 2.9</td> 147 </tr> 148 <tr> 149 <td rowspan="2">Lambda expressions</td> 150 <td><a href="https://wg21.link/n2927">N2927</a></td> 151 <td class="full" align="center">Clang 3.1</td> 152 </tr> 153 <tr> 154 <!-- from Albuquerque 2017 --> 155 <td><a href="https://wg21.link/p0588r1">P0588R1</a> (<a href="#dr">DR</a>)</td> 156 <td class="none" align="center">No</td> 157 </tr> 158 <tr> 159 <td>Declared type of an expression</td> 160 <td><a href="https://wg21.link/n2343">N2343</a></td> 161 <td class="full" align="center">Clang 2.9</td> 162 </tr> 163 <tr> 164 <td> Incomplete return types</td> 165 <td><a href="https://wg21.link/n3276">N3276</a></td> 166 <td class="full" align="center">Clang 3.1</td> 167 </tr> 168 <tr> 169 <td>Right angle brackets</td> 170 <td><a href="https://wg21.link/n1757">N1757</a></td> 171 <td class="full" align="center">Clang 2.9</td> 172 </tr> 173 <tr> 174 <td>Default template arguments for function templates</td> 175 <td><a href="https://wg21.link/cwg226">DR226</a></td> 176 <td class="full" align="center">Clang 2.9</td> 177 </tr> 178 <tr> 179 <td>Solving the SFINAE problem for expressions</td> 180 <td><a href="https://wg21.link/n2634">DR339</a></td> 181 <td class="full" align="center">Clang 2.9</td> 182 </tr> 183 <tr> 184 <td>Alias templates</td> 185 <td><a href="https://wg21.link/n2258">N2258</a></td> 186 <td class="full" align="center">Clang 3.0</td> 187 </tr> 188 <tr> 189 <td>Extern templates</td> 190 <td><a href="https://wg21.link/n1987">N1987</a></td> 191 <td class="full" align="center">Clang 2.9</td> 192 </tr> 193 <tr> 194 <td>Null pointer constant</td> 195 <td><a href="https://wg21.link/n2431">N2431</a></td> 196 <td class="full" align="center">Clang 3.0</td> 197 </tr> 198 <tr> 199 <td>Strongly-typed enums</td> 200 <td><a href="https://wg21.link/n2347">N2347</a></td> 201 <td class="full" align="center">Clang 2.9</td> 202 </tr> 203 <tr> 204 <td>Forward declarations for enums</td> 205 <td><a href="https://wg21.link/n2764">N2764</a> 206 <br><a href="https://wg21.link/cwg1206">DR1206</a></td> 207 <td class="full" align="center">Clang 3.1</td> 208 </tr> 209 <tr> 210 <td>Standardized attribute syntax</td> 211 <td><a href="https://wg21.link/n2761">N2761</a></td> 212 <td class="full" align="center">Clang 3.3 <a href="#n2761">(1)</a></td> 213 </tr> 214 <tr> 215 <td rowspan="2">Generalized constant expressions</td> 216 <td><a href="https://wg21.link/n2235">N2235</a></td> 217 <td class="full" align="center">Clang 3.1</td> 218 </tr> 219 <tr> 220 <!-- from Albuquerque 2017 --> 221 <td><a href="https://wg21.link/p0859r0">P0859R0</a> (<a href="#dr">DR</a>)</td> 222 <td class="full" align="center">Clang 8</td> 223 </tr> 224 <tr> 225 <td>Alignment support</td> 226 <td><a href="https://wg21.link/n2341">N2341</a></td> 227 <td class="full" align="center">Clang 3.3</td> 228 </tr> 229 <tr> 230 <td>Conditionally-support behavior</td> 231 <td><a href="https://wg21.link/n1627">N1627</a></td> 232 <td class="full" align="center">Clang 2.9</td> 233 </tr> 234 <tr> 235 <td>Changing undefined behavior into diagnosable errors</td> 236 <td><a href="https://wg21.link/n1727">N1727</a></td> 237 <td class="full" align="center">Clang 2.9</td> 238 </tr> 239 <tr> 240 <td>Delegating constructors</td> 241 <td><a href="https://wg21.link/n1986">N1986</a></td> 242 <td class="full" align="center">Clang 3.0</td> 243 </tr> 244 <tr> 245 <td rowspan="2">Inheriting constructors</td> 246 <td><a href="https://wg21.link/n2540">N2540</a></td> 247 <td class="full" align="center">Clang 3.3</td> 248 </tr> 249 <tr> 250 <!-- from Kona 2015 --> 251 <td><a href="https://wg21.link/p0136r1">P0136R1</a> (<a href="#dr">DR</a>)</td> 252 <td class="full" align="center">Clang 3.9</td> 253 </tr> 254 <tr> 255 <td>Explicit conversion operators</td> 256 <td><a href="https://wg21.link/n2437">N2437</a></td> 257 <td class="full" align="center">Clang 3.0</td> 258 </tr> 259 <tr> 260 <td>New character types</td> 261 <td><a href="https://wg21.link/n2249">N2249</a></td> 262 <td class="full" align="center">Clang 2.9</td> 263 </tr> 264 <tr> 265 <td>Unicode string literals</td> 266 <td><a href="https://wg21.link/n2442">N2442</a></td> 267 <td class="full" align="center">Clang 3.0</td> 268 </tr> 269 <tr> 270 <td>Raw string literals</td> 271 <td><a href="https://wg21.link/n2442">N2442</a></td> 272 <td class="full" align="center">Clang 3.0</td> 273 </tr> 274 <tr> 275 <td>Universal character names in literals</td> 276 <td><a href="https://wg21.link/n2170">N2170</a></td> 277 <td class="full" align="center">Clang 3.1</td> 278 </tr> 279 <tr> 280 <td>User-defined literals</td> 281 <td><a href="https://wg21.link/n2765">N2765</a></td> 282 <td class="full" align="center">Clang 3.1</td> 283 </tr> 284 <tr> 285 <td>Standard Layout Types</td> 286 <td><a href="https://wg21.link/n2342">N2342</a></td> 287 <td class="full" align="center">Clang 3.0</td> 288 </tr> 289 <tr> 290 <td rowspan="2">Defaulted functions</td> 291 <td><a href="https://wg21.link/n2346">N2346</a></td> 292 <td class="full" align="center">Clang 3.0</td> 293 </tr> 294 <tr> <!-- from Kona 2019--> 295 <td><a href="https://wg21.link/p1286r2">P1286R2</a> (<a href="#dr">DR</a>)</td> 296 <td class="full" align="center">Clang 9</td> 297 </tr> 298 <tr> 299 <td>Deleted functions</td> 300 <td><a href="https://wg21.link/n2346">N2346</a></td> 301 <td class="full" align="center">Clang 2.9</td> 302 </tr> 303 <tr> 304 <td>Extended friend declarations</td> 305 <td><a href="https://wg21.link/n1791">N1791</a></td> 306 <td class="full" align="center">Clang 2.9</td> 307 </tr> 308 <tr> 309 <td>Extending <code>sizeof</code></td> 310 <td><a href="https://wg21.link/n2253">N2253</a> 311 <br><a href="https://wg21.link/cwg850">DR850</a></td> 312 <td class="full" align="center">Clang 3.1</td> 313 </tr> 314 <tr> 315 <td>Inline namespaces</td> 316 <td><a href="https://wg21.link/n2535">N2535</a></td> 317 <td class="full" align="center">Clang 2.9</td> 318 </tr> 319 <tr> 320 <td>Unrestricted unions</td> 321 <td><a href="https://wg21.link/n2544">N2544</a></td> 322 <td class="full" align="center">Clang 3.1</td> 323 </tr> 324 <tr> 325 <td>Local and unnamed types as template arguments</td> 326 <td><a href="https://wg21.link/n2657">N2657</a></td> 327 <td class="full" align="center">Clang 2.9</td> 328 </tr> 329 <tr> 330 <td rowspan="2">Range-based for</td> 331 <td><a href="https://wg21.link/n2930">N2930</a></td> 332 <td class="full" align="center">Clang 3.0</td> 333 </tr> 334 <tr> 335 <!-- from Jacksonville 2018 --> 336 <td><a href="https://wg21.link/p0962r1">P0962R1</a> (<a href="#dr">DR</a>)</td> 337 <td class="full" align="center">Clang 8</td> 338 </tr> 339 <tr> 340 <td>Explicit virtual overrides</td> 341 <td><a href="https://wg21.link/n2928">N2928</a> 342 <br><a href="https://wg21.link/n3206">N3206</a> 343 <br><a href="https://wg21.link/n3272">N3272</a></td> 344 <td class="full" align="center">Clang 3.0</td> 345 </tr> 346 <tr> 347 <td>Minimal support for garbage collection and reachability-based leak detection</td> 348 <td><a href="https://wg21.link/n2670">N2670</a></td> 349 <td class="na" align="center">N/A <a href="#n2670">(2)</a></td> 350 </tr> 351 <tr> 352 <td>Allowing move constructors to throw [noexcept]</td> 353 <td><a href="https://wg21.link/n3050">N3050</a></td> 354 <td class="full" align="center">Clang 3.0</td> 355 </tr> 356 <tr> 357 <td>Defining move special member functions</td> 358 <td><a href="https://wg21.link/n3053">N3053</a></td> 359 <td class="full" align="center">Clang 3.0</td> 360 </tr> 361 362 <tr class="separator"> 363 <th align="center" colspan="3">Concurrency</th> 364 </tr> 365 <tr> 366 <td>Sequence points</td> 367 <td><a href="https://wg21.link/n2239">N2239</a></td> 368 <td class="full" align="center">Clang 3.3</td> 369 </tr> 370 <tr> 371 <td>Atomic operations</td> 372 <td><a href="https://wg21.link/n2427">N2427</a></td> 373 <td class="full" align="center">Clang 3.1</td> 374 </tr> 375 <tr> 376 <td>Strong Compare and Exchange</td> 377 <td><a href="https://wg21.link/n2748">N2748</a></td> 378 <td class="full" align="center">Clang 3.1 <a href="#n2748">(3)</a></td> 379 </tr> 380 <tr> 381 <td>Bidirectional Fences</td> 382 <td><a href="https://wg21.link/n2752">N2752</a></td> 383 <td class="full" align="center">Clang 3.1</td> 384 </tr> 385 386 <tr> 387 <td>Memory model</td> 388 <td><a href="https://wg21.link/n2429">N2429</a></td> 389 <td class="full" align="center">Clang 3.2</td> 390 </tr> 391 <tr> 392 <td>Data-dependency ordering: atomics and memory model</td> 393 <td><a href="https://wg21.link/n2664">N2664</a></td> 394 <td class="full" align="center">Clang 3.2 <a href="#n2664">(4)</a></td> 395 </tr> 396 <tr> 397 <td>Propagating exceptions</td> 398 <td><a href="https://wg21.link/n2179">N2179</a></td> 399 <td class="full" align="center">Clang 2.9</td> 400 </tr> 401 <tr> 402 <td>Allow atomics use in signal handlers</td> 403 <td><a href="https://wg21.link/n2547">N2547</a></td> 404 <td class="full" align="center">Clang 3.1</td> 405 </tr> 406 <tr> 407 <td>Thread-local storage</td> 408 <td><a href="https://wg21.link/n2659">N2659</a></td> 409 <td class="full" align="center">Clang 3.3 <a href="#n2659">(5)</a></td> 410 </tr> 411 <tr> 412 <td>Dynamic initialization and destruction with concurrency</td> 413 <td><a href="https://wg21.link/n2660">N2660</a></td> 414 <td class="full" align="center">Clang 2.9</td> 415 </tr> 416 417 <tr class="separator"> 418 <th align="center" colspan="3">C99 Features in C++11</th> 419 </tr> 420 <tr> 421 <td><code>__func__</code> predefined identifier</td> 422 <td><a href="https://wg21.link/n2340">N2340</a></td> 423 <td class="full" align="center">Clang 2.9</td> 424 </tr> 425 <tr> 426 <td>C99 preprocessor</td> 427 <td><a href="https://wg21.link/n1653">N1653</a></td> 428 <td class="full" align="center">Clang 2.9</td> 429 </tr> 430 <tr> 431 <td><code>long long</code></td> 432 <td><a href="https://wg21.link/n1811">N1811</a></td> 433 <td class="full" align="center">Clang 2.9</td> 434 </tr> 435 <tr> 436 <td>Extended integral types</td> 437 <td><a href="https://wg21.link/n1988">N1988</a></td> 438 <td class="na" align="center">N/A <a href="#n1988">(6)</a></td> 439 </tr> 440</table> 441 442<p> 443<span id="n2761">(1): The <code>[[carries_dependency]]</code> attribute 444has no effect.</span><br> 445<span id="n2670">(2): No compiler changes are required for an implementation 446such as Clang that does not provide garbage collection.</span><br> 447<span id="n2748">(3): All compare-exchange operations are emitted as 448strong compare-exchanges.</span><br> 449<span id="n2664">(4): <code>memory_order_consume</code> is lowered to 450<code>memory_order_acquire</code>.</span><br> 451<span id="n2659">(5): <code>thread_local</code> support 452requires a C++ runtime library providing <code>__cxa_thread_atexit</code>, such 453as <a href="https://libcxxabi.llvm.org">libc++abi</a> 3.6 or later, 454or libsupc++ 4.8 or later.</span><br> 455<span id="n1988">(6): No compiler changes are required for an implementation 456such as Clang that does not provide any extended integer types. 457<code>__int128</code> is not treated as an extended integer type, 458because changing <code>intmax_t</code> would be an ABI-incompatible 459change.</span> 460</p> 461</details> 462 463<h2 id="cxx14">C++14 implementation status</h2> 464 465<p>Clang 3.4 and later implement all of the <a 466 href="https://www.iso.org/standard/64029.html">ISO 467 C++ 2014 standard</a>. 468 469<p>You can use Clang in C++14 mode with the <code>-std=c++14</code> option 470(use <code>-std=c++1y</code> in Clang 3.4 and earlier).</p> 471 472<details> 473<summary>List of features and minimum Clang version with support</summary> 474 475<table width="689" border="1" cellspacing="0"> 476 <tr> 477 <th>Language Feature</th> 478 <th>C++14 Proposal</th> 479 <th>Available in Clang?</th> 480 </tr> 481 <tr> 482 <td>Tweak to certain C++ contextual conversions</td> 483 <td><a href="https://wg21.link/n3323">N3323</a></td> 484 <td class="full" align="center">Clang 3.4</td> 485 </tr> 486 <tr> 487 <td>Binary literals</td> 488 <td><a href="https://wg21.link/n3472">N3472</a></td> 489 <td class="full" align="center">Clang 2.9</td> 490 </tr> 491 <tr> 492 <td>decltype(auto)</td> 493 <td rowspan=2 style="vertical-align:middle"><a href="https://wg21.link/n3638">N3638</a></td> 494 <td class="full" align="center">Clang 3.3</td> 495 </tr> 496 <tr> 497 <td>Return type deduction for normal functions</td> 498 <td class="full" align="center">Clang 3.4</td> 499 </tr> 500 <tr> 501 <td>Initialized lambda captures</td> 502 <td><a href="https://wg21.link/n3648">N3648</a></td> 503 <td class="full" align="center">Clang 3.4</td> 504 </tr> 505 <tr> 506 <td>Generic lambdas</td> 507 <td><a href="https://wg21.link/n3649">N3649</a></td> 508 <td class="full" align="center">Clang 3.4</td> 509 </tr> 510 <tr> 511 <td>Variable templates</td> 512 <td><a href="https://wg21.link/n3651">N3651</a></td> 513 <td class="full" align="center">Clang 3.4</td> 514 </tr> 515 <tr> 516 <td>Relaxing requirements on constexpr functions</td> 517 <td><a href="https://wg21.link/n3652">N3652</a></td> 518 <td class="full" align="center">Clang 3.4</td> 519 </tr> 520 <tr> 521 <td>Member initializers and aggregates</td> 522 <td><a href="https://wg21.link/n3653">N3653</a></td> 523 <td class="full" align="center">Clang 3.3</td> 524 </tr> 525 <tr> 526 <td>Clarifying memory allocation</td> 527 <td><a href="https://wg21.link/n3664">N3664</a></td> 528 <td class="full" align="center">Clang 3.4</td> 529 </tr> 530 <tr> 531 <td><tt>[[deprecated]]</tt> attribute</td> 532 <td><a href="https://wg21.link/n3760">N3760</a></td> 533 <td class="full" align="center">Clang 3.4</td> 534 </tr> 535 <tr> 536 <td>Single quotation mark as digit separator</td> 537 <td><a href="https://wg21.link/n3781">N3781</a></td> 538 <td class="full" align="center">Clang 3.4</td> 539 </tr> 540 <tr> 541 <td>C++ Sized Deallocation</td> 542 <td><a href="https://wg21.link/n3778">N3778</a></td> 543 <td class="full" align="center">Clang 3.4 <a href="#n3778">(7)</a></td> 544 </tr> 545</table> 546 547<p> 548<span id="n3778">(7): In Clang 3.7 and later, sized deallocation is only enabled 549if the user passes the <code>-fsized-deallocation</code> flag. The user must 550supply definitions of the sized deallocation functions, either by providing them 551explicitly or by using a C++ standard library that does. <code>libstdc++</code> 552added these functions in version 5.0, and <code>libc++</code> added them in 553version 3.7. 554</span> 555</p> 556</details> 557 558<h2 id="cxx17">C++17 implementation status</h2> 559 560<p>Clang 5 and later implement all the features of the 561<a href="https://www.iso.org/standard/68564.html">ISO C++ 2017 standard</a>. 562 563<p>You can use Clang in C++17 mode with the <code>-std=c++17</code> option 564(use <code>-std=c++1z</code> in Clang 4 and earlier).</p> 565 566<details open> 567<summary>List of features and minimum Clang version with support</summary> 568 569<table width="689" border="1" cellspacing="0"> 570 <tr> 571 <th>Language Feature</th> 572 <th>C++17 Proposal</th> 573 <th>Available in Clang?</th> 574 </tr> 575 <!-- Issaquah 2014 papers --> 576 <tr> 577 <td><tt>static_assert</tt> with no message</td> 578 <td><a href="https://wg21.link/n3928">N3928</a></td> 579 <td class="full" align="center">Clang 3.5</td> 580 </tr> 581 <!-- Rapperswil papers --> 582 <tr> 583 <td>Disabling trigraph expansion by default</td> 584 <td><a href="https://wg21.link/n4086">N4086</a></td> 585 <td class="full" align="center">Clang 3.5</td> 586 </tr> 587 <tr> 588 <td><tt>typename</tt> in a template template parameter</td> 589 <td><a href="https://wg21.link/n4051">N4051</a></td> 590 <td class="full" align="center">Clang 3.5</td> 591 </tr> 592 <tr> 593 <td>New <tt>auto</tt> rules for direct-list-initialization 594 <td><a href="https://wg21.link/n3922">N3922</a></td> 595 <td class="full" align="center">Clang 3.8 <a href="#n3922">(8)</a></td> 596 </tr> 597 <!-- Urbana papers --> 598 <tr> 599 <td rowspan="2">Fold expressions</td> 600 <td><a href="https://wg21.link/n4295">N4295</a></td> 601 <td class="full" align="center">Clang 3.6</td> 602 </tr> 603 <tr> <!-- from Jacksonville --> 604 <td><a href="https://wg21.link/p0036r0">P0036R0</a></td> 605 <td class="full" align="center">Clang 3.9</td> 606 </tr> 607 <tr> 608 <td><tt>u8</tt> character literals</td> 609 <td><a href="https://wg21.link/n4267">N4267</a></td> 610 <td class="full" align="center">Clang 3.6</td> 611 </tr> 612 <tr> 613 <td>Nested namespace definition</td> 614 <td><a href="https://wg21.link/n4230">N4230</a></td> 615 <td class="full" align="center">Clang 3.6</td> 616 </tr> 617 <tr> 618 <td>Attributes for namespaces and enumerators</td> 619 <td><a href="https://wg21.link/n4266">N4266</a></td> 620 <td class="full" align="center">Clang 3.6</td> 621 </tr> 622 <tr> 623 <td>Allow constant evaluation for all non-type template arguments</td> 624 <td><a href="https://wg21.link/n4268">N4268</a></td> 625 <td class="full" align="center">Clang 3.6</td> 626 </tr> 627 <!-- Kona papers --> 628 <tr> 629 <td>Remove deprecated <tt>register</tt> storage class</td> 630 <td><a href="https://wg21.link/p0001r1">P0001R1</a></td> 631 <td class="full" align="center">Clang 3.8</td> 632 </tr> 633 <tr> 634 <td>Remove deprecated <tt>bool</tt> increment</td> 635 <td><a href="https://wg21.link/p0002r1">P0002R1</a></td> 636 <td class="full" align="center">Clang 3.8</td> 637 </tr> 638 <tr> 639 <td>Make exception specifications part of the type system</td> 640 <td><a href="https://wg21.link/p0012r1">P0012R1</a></td> 641 <td class="full" align="center">Clang 4</td> 642 </tr> 643 <tr> 644 <td><tt>__has_include</tt> in preprocessor conditionals</td> 645 <td><a href="https://wg21.link/p0061r1">P0061R1</a></td> 646 <td class="full" align="center">Yes</td> 647 </tr> 648 <!-- Jacksonville papers --> 649 <tr> 650 <td><tt>[[fallthrough]]</tt> attribute</td> 651 <td><a href="https://wg21.link/p0188r1">P0188R1</a></td> 652 <td class="full" align="center">Clang 3.9</td> 653 </tr> 654 <tr> 655 <td rowspan="2"><tt>[[nodiscard]]</tt> attribute</td> 656 <td><a href="https://wg21.link/p0189r1">P0189R1</a></td> 657 <td class="full" align="center">Clang 3.9</td> 658 </tr> 659 <tr> <!-- from Cologne 2019 --> 660 <td><a href="https://wg21.link/p1771r1">P1771R1</a> (<a href="#dr">DR</a>)</td> 661 <td class="full" align="center">Clang 9</td> 662 </tr> 663 <tr> 664 <td><tt>[[maybe_unused]]</tt> attribute</td> 665 <td><a href="https://wg21.link/p0212r1">P0212R1</a></td> 666 <td class="full" align="center">Clang 3.9</td> 667 </tr> 668 <tr> 669 <td>Aggregate initialization of classes with base classes</td> 670 <td><a href="https://wg21.link/p0017r1">P0017R1</a></td> 671 <td class="full" align="center">Clang 3.9</td> 672 </tr> 673 <tr> 674 <td><tt>constexpr</tt> lambda expressions</td> 675 <td><a href="https://wg21.link/p0170r1">P0170R1</a></td> 676 <td class="full" align="center">Clang 5</td> 677 </tr> 678 <tr> 679 <td>Differing <tt>begin</tt> and <tt>end</tt> types in range-based <tt>for</tt></td> 680 <td><a href="https://wg21.link/p0184r0">P0184R0</a></td> 681 <td class="full" align="center">Clang 3.9</td> 682 </tr> 683 <tr> 684 <td>Lambda capture of <tt>*this</tt></td> 685 <td><a href="https://wg21.link/p0018r3">P0018R3</a></td> 686 <td class="full" align="center">Clang 3.9</td> 687 </tr> 688 <tr> 689 <td>Direct-list-initialization of <tt>enum</tt>s</td> 690 <td><a href="https://wg21.link/p0138r2">P0138R2</a></td> 691 <td class="full" align="center">Clang 3.9</td> 692 </tr> 693 <tr> 694 <td>Hexadecimal floating-point literals</td> 695 <td><a href="https://wg21.link/p0245r1">P0245R1</a></td> 696 <td class="full" align="center">Yes</td> 697 </tr> 698 <!-- Oulu papers --> 699 <tr> 700 <td>Using attribute namespaces without repetition</td> 701 <td><a href="https://wg21.link/p0028r4">P0028R4</a></td> 702 <td class="full" align="center">Clang 3.9</td> 703 </tr> 704 <tr> 705 <td>Dynamic memory allocation for over-aligned data</td> 706 <td><a href="https://wg21.link/p0035r4">P0035R4</a></td> 707 <td class="full" align="center">Clang 4</td> 708 </tr> 709 <tr> 710 <td rowspan="4">Template argument deduction for class templates</td> 711 <td><a href="https://wg21.link/p0091r3">P0091R3</a></td> 712 <td rowspan="2" class="full" align="center">Clang 5</td> 713 </tr> 714 <tr> <!-- from Issaquah --> 715 <td><a href="https://wg21.link/p0512r0">P0512R0</a></td> 716 </tr> 717 <tr> 718 <!-- from Kona 2017 --> 719 <td><a href="https://wg21.link/p0620r1">P0620R0</a> (<a href="#dr">DR</a>)</td> 720 <td class="full" align="center">Clang 7</td> 721 </tr> 722 <tr> 723 <!-- from Toronto 2017 --> 724 <td><a href="https://wg21.link/p0702r1">P0702R1</a> (<a href="#dr">DR</a>)</td> 725 <td class="full" align="center">Clang 6</td> 726 </tr> 727 <tr> 728 <td>Non-type template parameters with <tt>auto</tt> type</td> 729 <td><a href="https://wg21.link/p0127r2">P0127R2</a></td> 730 <td class="full" align="center">Clang 4</td> 731 </tr> 732 <tr> 733 <td>Guaranteed copy elision</td> 734 <td><a href="https://wg21.link/p0135r1">P0135R1</a></td> 735 <td class="full" align="center">Clang 4</td> 736 </tr> 737 <tr> 738 <td rowspan=2>Stricter expression evaluation order</td> 739 <td><a href="https://wg21.link/p0145r3">P0145R3</a></td> 740 <td class="full" align="center" rowspan=2>Clang 4 <a href="#p0145">(9)</a></td> 741 </tr> 742 <tr> 743 <td><a href="https://wg21.link/p0400r0">P0400R0</a></td> 744 </tr> 745 <tr> 746 <td>Requirement to ignore unknown attributes</td> 747 <td><a href="https://wg21.link/p0283r2">P0283R2</a></td> 748 <td class="full" align="center">Yes</td> 749 </tr> 750 <tr> 751 <td><tt>constexpr</tt> <em>if-statement</em>s</td> 752 <td><a href="https://wg21.link/p0292r2">P0292R2</a></td> 753 <td class="full" align="center">Clang 3.9</td> 754 </tr> 755 <tr> 756 <td>Inline variables</td> 757 <td><a href="https://wg21.link/p0386r2">P0386R2</a></td> 758 <td class="full" align="center">Clang 3.9</td> 759 </tr> 760 <tr> 761 <td rowspan="3">Structured bindings</td> 762 <td><a href="https://wg21.link/p0217r3">P0217R3</a></td> 763 <td class="full" align="center">Clang 4</td> 764 </tr> 765 <tr> 766 <!-- from Jacksonville 2018 --> 767 <td><a href="https://wg21.link/p0961r1">P0961R1</a> (<a href="#dr">DR</a>)</td> 768 <td class="full" align="center">Clang 8</td> 769 </tr> 770 <tr> 771 <!-- from Jacksonville 2018 --> 772 <td><a href="https://wg21.link/p0969r0">P0969R0</a> (<a href="#dr">DR</a>)</td> 773 <td class="full" align="center">Clang 8</td> 774 </tr> 775 <tr> 776 <td>Separate variable and condition for <tt>if</tt> and <tt>switch</tt></td> 777 <td><a href="https://wg21.link/p0305r1">P0305R1</a></td> 778 <td class="full" align="center">Clang 3.9</td> 779 </tr> 780 <!-- Issaquah 2016 papers --> 781 <tr> 782 <td>Matching template template parameters to compatible arguments</td> 783 <td><a href="https://wg21.link/p0522r0">P0522R0</a></td> 784 <td class="partial" align="center">Partial <a href="#p0522">(10)</a></td> 785 </tr> 786 <tr> 787 <td>Removing deprecated dynamic exception specifications</td> 788 <td><a href="https://wg21.link/p0003r5">P0003R5</a></td> 789 <td class="full" align="center">Clang 4</td> 790 </tr> 791 <tr> 792 <td>Pack expansions in <em>using-declarations</em></td> 793 <td><a href="https://wg21.link/p0195r2">P0195R2</a></td> 794 <td class="full" align="center">Clang 4</td> 795 </tr> 796</table> 797 798<p> 799<span id="n3922">(8): This is a backwards-incompatible change that is applied to 800all language versions that allow type deduction from <tt>auto</tt> 801(per the request of the C++ committee). 802In Clang 3.7, a warning is emitted for all cases that would change meaning. 803</span><br> 804<span id="p0145">(9): Under the MS ABI, function parameters are destroyed from 805left to right in the callee. As a result, function parameters in calls to 806<tt>operator<<</tt>, <tt>operator>></tt>, <tt>operator->*</tt>, 807<tt>operator&&</tt>, <tt>operator||</tt>, and <tt>operator,</tt> 808functions using expression syntax are no longer guaranteed to be destroyed in 809reverse construction order in that ABI. 810This is not fully supported during constant expression evaluation until Clang 12. 811</span><br> 812<span id="p0522">(10): Despite being the resolution to a Defect Report, this 813feature is disabled by default in all language versions, and can be enabled 814explicitly with the flag <tt>-frelaxed-template-template-args</tt> in Clang 4 815onwards. 816The change to the standard lacks a corresponding change for template partial 817ordering, resulting in ambiguity errors for reasonable and previously-valid 818code. This issue is expected to be rectified soon. 819</span> 820</p> 821</details> 822 823<h2 id="cxx20">C++20 implementation status</h2> 824 825<p>Clang has support for some of the features of the 826ISO C++ 2020 Draft International Standard. 827 828<p>You can use Clang in C++20 mode with the <code>-std=c++20</code> option 829(use <code>-std=c++2a</code> in Clang 9 and earlier).</p> 830 831<details open> 832<summary>List of features and minimum Clang version with support</summary> 833 834<table width="689" border="1" cellspacing="0"> 835 <tr> 836 <th>Language Feature</th> 837 <th>C++20 Proposal</th> 838 <th>Available in Clang?</th> 839 </tr> 840 <!-- Toronto 2017 papers --> 841 <tr> 842 <td>Default member initializers for bit-fields</td> 843 <td><a href="https://wg21.link/p0683r1">P0683R1</a></td> 844 <td class="full" align="center">Clang 6</td> 845 </tr> 846 <tr> 847 <td><tt>const&</tt>-qualified pointers to members</td> 848 <td><a href="https://wg21.link/p0704r1">P0704R1</a></td> 849 <td class="full" align="center">Clang 6</td> 850 </tr> 851 <tr> 852 <td>Allow <i>lambda-capture</i> <tt>[=, this]</tt></td> 853 <td><a href="https://wg21.link/p0409r2">P0409R2</a></td> 854 <td class="full" align="center">Clang 6</td> 855 </tr> 856 <tr> 857 <td rowspan="2"><tt>__VA_OPT__</tt> for preprocessor comma elision</td> 858 <td><a href="https://wg21.link/p0306r4">P0306R4</a></td> 859 <td class="full" align="center">Clang 6</td> 860 </tr> 861 <tr> <!-- from Rapperswil --> 862 <td><a href="https://wg21.link/p1042r1">P1042R1</a></td> 863 <td class="full" align="center">Clang 9</td> 864 </tr> 865 <tr> 866 <td>Designated initializers</td> 867 <td><a href="https://wg21.link/p0329r4">P0329R4</a></td> 868 <td class="full" align="center">Clang 10</td> 869 </tr> 870 <tr> 871 <td><i>template-parameter-list</i> for generic lambdas</td> 872 <td><a href="https://wg21.link/p0428r2">P0428R2</a></td> 873 <td class="full" align="center">Clang 9</td> 874 </tr> 875 <tr id="p0734"> 876 <td rowspan="12">Concepts</td> 877 <td><a href="https://wg21.link/p0734r0">P0734R0</a></td> 878 <td class="full" align="center">Clang 10</td> 879 </tr> 880 <tr> <!-- from Albuquerque --> 881 <td><a href="https://wg21.link/p0857r0">P0857R0</a></td> 882 <td class="partial" align="center">Partial</td> 883 </tr> 884 <tr> <!-- from San Diego --> 885 <td><a href="https://wg21.link/p1084r2">P1084R2</a></td> 886 <td rowspan="2" class="full" align="center">Clang 10</td> 887 </tr> 888 <tr> 889 <td><a href="https://wg21.link/p1141r2">P1141R2</a></td> 890 </tr> 891 <tr> <!-- from Cologne --> 892 <td><a href="https://wg21.link/p0848r3">P0848R3</a></td> 893 <td rowspan="1" class="none" align="center">No</td> 894 </tr> 895 <tr> 896 <td><a href="https://wg21.link/p1616r1">P1616R1</a></td> 897 <td rowspan="2" class="full" align="center">Clang 10</td> 898 </tr> 899 <tr> 900 <td><a href="https://wg21.link/p1452r2">P1452R2</a></td> 901 </tr> 902 <tr> <!-- from Belfast --> 903 <td><a href="https://wg21.link/p1972r0">P1972R0</a></td> 904 <td rowspan="5" class="none" align="center">No</td> 905 </tr> 906 <tr> 907 <td><a href="https://wg21.link/p1980r0">P1980R0</a></td> 908 </tr> 909 <tr> <!-- from Prague --> 910 <td><a href="https://wg21.link/p2103r0">P2103R0</a></td> 911 </tr> 912 <tr> 913 <td><a href="https://wg21.link/p2092r0">P2092R0</a></td> 914 </tr> 915 <tr> 916 <td><a href="https://wg21.link/p2113r0">P2113R0</a></td> 917 </tr> 918 <!-- Albuquerque papers --> 919 <tr> 920 <td>Range-based for statements with initializer</td> 921 <td><a href="https://wg21.link/p0614r1">P0614R1</a></td> 922 <td class="full" align="center">Clang 8</td> 923 </tr> 924 <tr> 925 <td>ADL and function templates that are not visible</td> 926 <td><a href="https://wg21.link/p0846r0">P0846R0</a></td> 927 <td class="full" align="center">Clang 9</td> 928 </tr> 929 <tr> 930 <td><tt>const</tt> mismatch with defaulted copy constructor</td> 931 <td><a href="https://wg21.link/p0641r2">P0641R2</a></td> 932 <td class="full" align="center">Clang 8</td> 933 </tr> 934 <tr> 935 <td rowspan="10">Consistent comparison (<tt>operator<=></tt>)</td> 936 <td><a href="https://wg21.link/p0515r3">P0515R3</a></td> 937 <td rowspan="8" class="full" align="center">Clang 10</td> 938 </tr> 939 <tr> <!-- from Jacksonville --> 940 <td><a href="https://wg21.link/p0905r1">P0905R1</a></td> 941 </tr> 942 <tr> <!-- from Rapperswil --> 943 <td><a href="https://wg21.link/p1120r0">P1120R0</a></td> 944 </tr> 945 <tr> <!-- from Kona 2019 --> 946 <td><a href="https://wg21.link/p1185r2">P1185R2</a></td> 947 </tr> 948 <tr> <!-- from Cologne --> 949 <td><a href="https://wg21.link/p1186r3">P1186R3</a></td> 950 </tr> 951 <tr> 952 <td><a href="https://wg21.link/p1630r1">P1630R1</a></td> 953 </tr> 954 <tr> <!-- from Belfast --> 955 <td><a href="https://wg21.link/p1946r0">P1946R0</a></td> 956 </tr> 957 <tr> 958 <td><a href="https://wg21.link/p1959r0">P1959R0</a></td> 959 </tr> 960 <tr> <!-- from Prague --> 961 <td><a href="https://wg21.link/p2002r1">P2002R1</a></td> 962 <td class="partial" align="center">Partial</td> 963 </tr> 964 <tr> 965 <td><a href="https://wg21.link/p2085r0">P2085R0</a></td> 966 <td class="none" align="center">No</td> 967 </tr> 968 <tr> 969 <td>Access checking on specializations</td> 970 <td><a href="https://wg21.link/p0692r1">P0692R1</a></td> 971 <td class="partial" align="center">Partial</td> 972 </tr> 973 <tr> 974 <td>Default constructible and assignable stateless lambdas</td> 975 <td><a href="https://wg21.link/p0624r2">P0624R2</a></td> 976 <td class="full" align="center">Clang 8</td> 977 </tr> 978 <tr> 979 <td>Lambdas in unevaluated contexts</td> 980 <td><a href="https://wg21.link/p0315r4">P0315R4</a></td> 981 <td class="none" align="center">No</td> 982 </tr> 983 <!-- Jacksonville papers --> 984 <tr> 985 <td><tt>[[no_unique_address]]</tt> attribute</td> 986 <td><a href="https://wg21.link/p0840r2">P0840R2</a></td> 987 <td class="full" align="center">Clang 9</td> 988 </tr> 989 <tr> 990 <td><tt>[[likely]]</tt> and <tt>[[unlikely]]</tt> attributes</td> 991 <td><a href="https://wg21.link/p0479r5">P0479R5</a></td> 992 <td class="unreleased" align="center">Clang 12</td> 993 </tr> 994 <tr> 995 <td><tt>typename</tt> optional in more contexts</td> 996 <td><a href="https://wg21.link/p0634r3">P0634R3</a></td> 997 <td class="none" align="center">No</td> 998 </tr> 999 <tr> 1000 <td>Pack expansion in lambda <i>init-capture</i></td> 1001 <td><a href="https://wg21.link/p0780r2">P0780R2</a></td> 1002 <td class="full" align="center">Clang 9</td> 1003 </tr> 1004 <!-- Rapperswil papers --> 1005 <tr> 1006 <td rowspan="2">Class types as non-type template parameters</td> 1007 <td><a href="https://wg21.link/p0732r2">P0732R2</a></td> 1008 <td rowspan="2" class="none" align="center">No</td> 1009 </tr> 1010 <tr> <!-- from Belfast --> 1011 <td><a href="https://wg21.link/p1907r1">P1907R1</a></td> 1012 </tr> 1013 <tr> 1014 <td>Destroying operator delete</td> 1015 <td><a href="https://wg21.link/p0722r3">P0722R3</a></td> 1016 <td class="full" align="center">Clang 6</td> 1017 </tr> 1018 <tr> 1019 <td rowspan="7">Relaxations of <tt>constexpr</tt> restrictions</td> 1020 <td><a href="https://wg21.link/p1064r0">P1064R0</a></td> 1021 <td class="full" align="center">Clang 9</td> 1022 </tr> 1023 <tr> <!-- from San Diego --> 1024 <td><a href="https://wg21.link/p1002r1">P1002R1</a></td> 1025 <td class="full" align="center">Clang 8</td> 1026 </tr> 1027 <tr> 1028 <td><a href="https://wg21.link/p1327r1">P1327R1</a></td> 1029 <td rowspan="2" class="full" align="center">Clang 9</td> 1030 </tr> 1031 <tr> 1032 <td><a href="https://wg21.link/p1330r0">P1330R0</a></td> 1033 </tr> 1034 <tr> <!-- from Cologne --> 1035 <td><a href="https://wg21.link/p1331r2">P1331R2</a></td> 1036 <td rowspan="3" class="full" align="center">Clang 10</td> 1037 </tr> 1038 <tr> 1039 <td><a href="https://wg21.link/p1668r1">P1668R1</a></td> 1040 </tr> 1041 <tr> 1042 <td><a href="https://wg21.link/p0784r7">P0784R7</a></td> 1043 </tr> 1044 <tr> 1045 <td>Prohibit aggregates with user-declared constructors</td> 1046 <td><a href="https://wg21.link/p1008r1">P1008R1</a></td> 1047 <td class="full" align="center">Clang 8</td> 1048 </tr> 1049 <tr> 1050 <td>Feature test macros</td> 1051 <td><a href="https://wg21.link/p0941r2">P0941R2</a></td> 1052 <td class="full" align="center"><a href="#sd6">(see below)</a></td> 1053 </tr> 1054 <tr> 1055 <td><tt>explicit(bool)</tt></td> 1056 <td><a href="https://wg21.link/p0892r2">P0892R2</a></td> 1057 <td class="full" align="center">Clang 9</td> 1058 </tr> 1059 <!-- San Diego papers --> 1060 <tr> 1061 <td>Signed integers are two's complement</td> 1062 <td><a href="https://wg21.link/p1236r1">P1236R1</a></td> 1063 <td class="full" align="center">Clang 9</td> 1064 </tr> 1065 <tr> 1066 <td><tt>char8_t</tt></td> 1067 <td><a href="https://wg21.link/p0482r6">P0482R6</a></td> 1068 <td class="full" align="center">Clang 7 <a href="#p0482">(11)</a></td> 1069 </tr> 1070 <tr> 1071 <td rowspan=2>Immediate functions (<tt>consteval</tt>)</td> 1072 <td><a href="https://wg21.link/p1073r3">P1073R3</a></td> 1073 <td rowspan=2 class="none" align="center">No</td> 1074 </tr> 1075 <tr> <!-- from Prague --> 1076 <td><a href="https://wg21.link/p1937r2">P1937R2</a></td> 1077 </tr> 1078 <tr> 1079 <td><tt>std::is_constant_evaluated</tt></td> 1080 <td><a href="https://wg21.link/p0595r2">P0595R2</a></td> 1081 <td class="full" align="center">Clang 9</td> 1082 </tr> 1083 <tr> 1084 <td>Nested inline namespaces</td> 1085 <td><a href="https://wg21.link/p1094r2">P1094R2</a></td> 1086 <td class="full" align="center">Clang 8</td> 1087 </tr> 1088 <!-- Kona 2019 papers --> 1089 <tr> 1090 <td rowspan="2">Structured binding extensions</td> 1091 <td><a href="https://wg21.link/p1091r3">P1091R3</a></td> 1092 <td rowspan="2" class="partial" align="center">Partial</td> 1093 </tr> 1094 <tr> 1095 <td><a href="https://wg21.link/p1381r1">P1381R1</a></td> 1096 </tr> 1097 <tr> 1098 <td rowspan="2">Stronger Unicode requirements</td> 1099 <td><a href="https://wg21.link/p1041r4">P1041R4</a></td> 1100 <td rowspan="2" class="full" align="center">Yes</td> 1101 </tr> 1102 <tr> 1103 <td><a href="https://wg21.link/p1139r2">P1139R2</a></td> 1104 </tr> 1105 <tr> 1106 <td rowspan="2">Parenthesized initialization of aggregates</td> 1107 <td><a href="https://wg21.link/p0960r3">P0960R3</a></td> 1108 <td rowspan="2" class="none" align="center">No</td> 1109 </tr> 1110 <tr> <!-- from Belfast --> 1111 <td><a href="https://wg21.link/p1975r0">P1975R0</a></td> 1112 </tr> 1113 <tr> 1114 <td rowspan="10">Modules</td> 1115 <td><a href="https://wg21.link/p1103r3">P1103R3</a></td> 1116 <td class="partial" align="center">Partial</td> 1117 </tr> 1118 <tr> <!-- from Cologne --> 1119 <td><a href="https://wg21.link/p1766r1">P1766R1</a> (<a href="#dr">DR</a>)</td> 1120 <td class="unreleased" align="center">Clang 11</td> 1121 </tr> 1122 <tr> 1123 <td><a href="https://wg21.link/p1811r0">P1811R0</a></td> 1124 <td rowspan="2" class="none" align="center">No</td> 1125 </tr> 1126 <tr> 1127 <td><a href="https://wg21.link/p1703r1">P1703R1</a></td> 1128 </tr> 1129 <tr> <!-- from Belfast --> 1130 <td><a href="https://wg21.link/p1874r1">P1874R1</a></td> 1131 <td class="partial" align="center">Partial</td> 1132 </tr> 1133 <tr> <!-- from Belfast --> 1134 <td><a href="https://wg21.link/p1979r0">P1979R0</a></td> 1135 <td rowspan="3" class="none" align="center">No</td> 1136 </tr> 1137 <tr> <!-- from Prague --> 1138 <td><a href="https://wg21.link/p1779r3">P1779R3</a></td> 1139 </tr> 1140 <tr> 1141 <td><a href="https://wg21.link/p1857r3">P1857R3</a></td> 1142 </tr> 1143 <tr> 1144 <td><a href="https://wg21.link/p2115r0">P2115R0</a></td> 1145 <td class="partial" align="center">Partial</td> 1146 </tr> 1147 <tr> 1148 <td><a href="https://wg21.link/p1815r2">P1815R2</a></td> 1149 <td class="none" align="center">No</td> 1150 </tr> 1151 <tr> 1152 <td>Coroutines</td> 1153 <td><a href="https://wg21.link/p0912r5">P0912R5</a></td> 1154 <td class="partial" align="center">Partial</td> 1155 </tr> 1156 <!-- Cologne 2019 papers --> 1157 <tr> 1158 <td>Deprecate <tt>a[b,c]</tt></td> 1159 <td><a href="https://wg21.link/p1161r3">P1161R3</a></td> 1160 <td class="full" align="center">Clang 9</td> 1161 </tr> 1162 <tr> 1163 <td>Deprecate some problematic uses of <tt>volatile</tt></td> 1164 <td><a href="https://wg21.link/p1152r4">P1152R4</a></td> 1165 <td class="full" align="center">Clang 10</td> 1166 </tr> 1167 <tr> 1168 <td><tt>[[nodiscard("with reason")]]</tt></td> 1169 <td><a href="https://wg21.link/p1301r4">P1301R4</a></td> 1170 <td class="full" align="center">Clang 9</td> 1171 </tr> 1172 <tr> 1173 <td><tt>using enum</tt></td> 1174 <td><a href="https://wg21.link/p1099r5">P1099R5</a></td> 1175 <td class="none" align="center">No</td> 1176 </tr> 1177 <tr> 1178 <td rowspan=2>Class template argument deduction for aggregates</td> 1179 <td><a href="https://wg21.link/p1816r0">P1816R0</a></td> 1180 <td rowspan=2 class="none" align="center">No</td> 1181 </tr> 1182 <tr> <!-- from Prague --> 1183 <td><a href="https://wg21.link/p2082r1">P2082R1</a></td> 1184 </tr> 1185 <tr> 1186 <td>Class template argument deduction for alias templates</td> 1187 <td><a href="https://wg21.link/p1814r0">P1814R0</a></td> 1188 <td class="none" align="center">No</td> 1189 </tr> 1190 <tr> 1191 <td>Permit conversions to arrays of unknown bound</td> 1192 <td><a href="https://wg21.link/p0388r4">P0388R4</a></td> 1193 <td class="none" align="center">No</td> 1194 </tr> 1195 <tr> 1196 <td><tt>constinit</tt></td> 1197 <td><a href="https://wg21.link/p1143r2">P1143R2</a></td> 1198 <td class="full" align="center">Clang 10</td> 1199 </tr> 1200 <!-- Prague 2019 papers --> 1201 <tr> 1202 <td>Pseudo-destructors end object lifetimes</td> 1203 <td><a href="https://wg21.link/p0593r6">P0593R6</a> (<a href="#dr">DR</a>)</td> 1204 <td class="unreleased" align="center">Clang 11</td> 1205 </tr> 1206</table> 1207 1208<p> 1209<span id="p0482">(11): Prior to Clang 8, this feature is not enabled by 1210<tt>-std=c++20</tt>, but can be enabled with <tt>-fchar8_t</tt>. 1211</span> 1212</p> 1213</details> 1214 1215<h2 id="dr">Defect reports</h2> 1216 1217<p>Clang generally aims to implement resolutions to Defect Reports (bug fixes 1218against prior standards) retroactively, in all prior standard versions where 1219the fix is meaningful. Significant Defect Report changes to language features 1220after the publication of the relevant standard are marked (DR) in the above 1221table.</p> 1222 1223<p>Clang also has a test suite for conformance to resolutions for issues on the 1224<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_toc.html">C++ core issues list</a>, 1225most of which are considered Defect Reports. 1226<a href="cxx_dr_status.html">Implementation status for C++ core issues</a> based on 1227that test suite is tracked on a separate page.</p> 1228 1229<h2 id="ts">Technical specifications and standing documents</h2> 1230 1231<p>ISO C++ also publishes a number of documents describing additional language 1232and library features that are not part of standard C++.</p> 1233 1234<details open> 1235<summary>List of features and minimum Clang version with support</summary> 1236 1237<table width="689" border="1" cellspacing="0"> 1238 <tr> 1239 <th>Document</th> 1240 <th>Latest draft</th> 1241 <th>Compiler flag</th> 1242 <th>Available in Clang?</th> 1243 </tr> 1244 <tr id="sd6"> 1245 <td rowspan="7">SD-6: SG10 feature test recommendations</td> 1246 <td rowspan="7"><a href="https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations">SD-6</a></td> 1247 <td rowspan="7">N/A</td> 1248 <td class="full" align="center"> 1249 Clang 3.4 (<a href="https://wg21.link/n3745">N3745</a>)</br> 1250 </td> 1251 </tr> 1252 <tr> 1253 <td class="full" align="center"> 1254 Clang 3.6 (<a href="https://wg21.link/n4200">N4200</a>)</a> 1255 </td> 1256 </tr> 1257 <tr> 1258 <td class="full" align="center"> 1259 Clang 4 (<a href="https://wg21.link/p0096r3">P0096R3</a>)</a> 1260 </td> 1261 </tr> 1262 <tr> 1263 <td class="full" align="center"> 1264 Clang 5 (<a href="https://wg21.link/p0096r4">P0096R4</a>)</a> 1265 </td> 1266 </tr> 1267 <tr> 1268 <td class="full" align="center"> 1269 Clang 7 (<a href="https://wg21.link/p0096r5">P0096R5</a>)</a> 1270 </td> 1271 </tr> 1272 <tr> 1273 <td class="full" align="center"> 1274 Clang 9 (<a href="https://wg21.link/p1353r0">P1353R0</a>) 1275 </td> 1276 </tr> 1277 <tr> 1278 <td class="full" align="center"> 1279 Clang 10 (<a href="https://wg21.link/p1902r1">P1902R1</a>)</a> 1280 </td> 1281 </tr> 1282 <!-- No compiler support is known to be needed for: 1283 * Concurrency TS 1284 * Parallelism TS (v1, v2) 1285 * Ranges TS 1286 * Networking TS 1287 * File System TS 1288 --> 1289 <tr> 1290 <td>[TS] Concepts</td> 1291 <td><a href="https://wg21.link/p0121r0">P0121R0</a></td> 1292 <td></td> 1293 <td class="na" align="center">Superseded by <a href="#p0734">P0734R0</a></td> 1294 </tr> 1295 <tr> 1296 <!-- track unimplemented Coroutines features: p0913r1 p0914r1 p1356r0 --> 1297 <td rowspan="2">[TS] Coroutines</td> 1298 <td rowspan="2"><a href="https://isocpp.org/files/papers/N4663.pdf">N4663</a></td> 1299 <td><tt>-fcoroutines-ts<br>-stdlib=libc++</tt></td> 1300 <td class="full" align="center">Clang 5</td> 1301 </tr> 1302 <tr> 1303 <td><tt>-std=c++20<br>-stdlib=libc++</tt></td> 1304 <td class="na" align="center">Superseded by <a href="#p0912">P0912R5</a></td> 1305 </tr> 1306 <tr> 1307 <td>[TS] Library Fundamentals, Version 1 (invocation type traits)</td> 1308 <td><a href="https://wg21.link/n4480">N4480</a></td> 1309 <td>N/A</td> 1310 <td class="none" align="center">No</td> 1311 </tr> 1312 <tr> 1313 <td>[TS] Library Fundamentals, Version 2 (<tt>source_location</tt>)</td> 1314 <td><a href="https://wg21.link/n4617">N4617</a></td> 1315 <td>N/A</td> 1316 <td class="full" align="center">Clang 9 (<a href="docs/LanguageExtensions.html#source-location-builtins">documentation</a>)</td> 1317 </tr> 1318 <tr> 1319 <td>[TS] Modules</td> 1320 <td><a href="https://wg21.link/n4720">N4720</a></td> 1321 <td><tt>-fmodules-ts</tt></td> 1322 <td class="na" align="center">Superseded by <a href="#p1103">P1103R3</a></td> 1323 </tr> 1324 <tr> 1325 <td>[DRAFT TS] Reflection</td> 1326 <td><a href="https://wg21.link/n4818">N4818</a></td> 1327 <td></td> 1328 <td class="none" align="center">No</td> 1329 </tr> 1330 <tr> 1331 <td>[TS] Transactional Memory</td> 1332 <td><a href="https://wg21.link/n4514">N4514</a></td> 1333 <td></td> 1334 <td class="none" align="center">No</td> 1335 </tr> 1336</table> 1337</details> 1338 1339</div> 1340</body> 1341</html> 1342