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. 810</span><br> 811<span id="p0522">(10): Despite being the resolution to a Defect Report, this 812feature is disabled by default in all language versions, and can be enabled 813explicitly with the flag <tt>-frelaxed-template-template-args</tt> in Clang 4 814onwards. 815The change to the standard lacks a corresponding change for template partial 816ordering, resulting in ambiguity errors for reasonable and previously-valid 817code. This issue is expected to be rectified soon. 818</span> 819</p> 820</details> 821 822<h2 id="cxx20">C++20 implementation status</h2> 823 824<p>Clang has support for some of the features of the 825ISO C++ 2020 Draft International Standard. 826 827<p>You can use Clang in C++20 mode with the <code>-std=c++20</code> option 828(use <code>-std=c++2a</code> in Clang 9 and earlier).</p> 829 830<details open> 831<summary>List of features and minimum Clang version with support</summary> 832 833<table width="689" border="1" cellspacing="0"> 834 <tr> 835 <th>Language Feature</th> 836 <th>C++20 Proposal</th> 837 <th>Available in Clang?</th> 838 </tr> 839 <!-- Toronto 2017 papers --> 840 <tr> 841 <td>Default member initializers for bit-fields</td> 842 <td><a href="https://wg21.link/p0683r1">P0683R1</a></td> 843 <td class="full" align="center">Clang 6</td> 844 </tr> 845 <tr> 846 <td><tt>const&</tt>-qualified pointers to members</td> 847 <td><a href="https://wg21.link/p0704r1">P0704R1</a></td> 848 <td class="full" align="center">Clang 6</td> 849 </tr> 850 <tr> 851 <td>Allow <i>lambda-capture</i> <tt>[=, this]</tt></td> 852 <td><a href="https://wg21.link/p0409r2">P0409R2</a></td> 853 <td class="full" align="center">Clang 6</td> 854 </tr> 855 <tr> 856 <td rowspan="2"><tt>__VA_OPT__</tt> for preprocessor comma elision</td> 857 <td><a href="https://wg21.link/p0306r4">P0306R4</a></td> 858 <td class="full" align="center">Clang 6</td> 859 </tr> 860 <tr> <!-- from Rapperswil --> 861 <td><a href="https://wg21.link/p1042r1">P1042R1</a></td> 862 <td class="full" align="center">Clang 9</td> 863 </tr> 864 <tr> 865 <td>Designated initializers</td> 866 <td><a href="https://wg21.link/p0329r4">P0329R4</a></td> 867 <td class="full" align="center">Clang 10</td> 868 </tr> 869 <tr> 870 <td><i>template-parameter-list</i> for generic lambdas</td> 871 <td><a href="https://wg21.link/p0428r2">P0428R2</a></td> 872 <td class="full" align="center">Clang 9</td> 873 </tr> 874 <tr id="p0734"> 875 <td rowspan="12">Concepts</td> 876 <td><a href="https://wg21.link/p0734r0">P0734R0</a></td> 877 <td rowspan="4" class="full" align="center">Clang 10</td> 878 </tr> 879 <tr> <!-- from Albuquerque --> 880 <td><a href="https://wg21.link/p0857r0">P0857R0</a></td> 881 </tr> 882 <tr> <!-- from San Diego --> 883 <td><a href="https://wg21.link/p1084r2">P1084R2</a></td> 884 </tr> 885 <tr> 886 <td><a href="https://wg21.link/p1141r2">P1141R2</a></td> 887 </tr> 888 <tr> <!-- from Cologne --> 889 <td><a href="https://wg21.link/p0848r3">P0848R3</a></td> 890 <td rowspan="1" class="none" align="center">No</td> 891 </tr> 892 <tr> 893 <td><a href="https://wg21.link/p1616r1">P1616R1</a></td> 894 <td rowspan="2" class="full" align="center">Clang 10</td> 895 </tr> 896 <tr> 897 <td><a href="https://wg21.link/p1452r2">P1452R2</a></td> 898 </tr> 899 <tr> <!-- from Belfast --> 900 <td><a href="https://wg21.link/p1972r0">P1972R0</a></td> 901 <td rowspan="2" class="none" align="center">No</td> 902 </tr> 903 <tr> 904 <td><a href="https://wg21.link/p1980r0">P1980R0</a></td> 905 </tr> 906 <tr> <!-- from Prague --> 907 <td><a href="https://wg21.link/p2103r0">P2103R0</a></td> 908 <td rowspan="3" class="none" align="center">No</td> 909 </tr> 910 <tr> 911 <td><a href="https://wg21.link/p2092r0">P2092R0</a></td> 912 </tr> 913 <tr> 914 <td><a href="https://wg21.link/p2113r0">P2113R0</a></td> 915 </tr> 916 <!-- Albuquerque papers --> 917 <tr> 918 <td>Range-based for statements with initializer</td> 919 <td><a href="https://wg21.link/p0614r1">P0614R1</a></td> 920 <td class="full" align="center">Clang 8</td> 921 </tr> 922 <tr> 923 <td>ADL and function templates that are not visible</td> 924 <td><a href="https://wg21.link/p0846r0">P0846R0</a></td> 925 <td class="full" align="center">Clang 9</td> 926 </tr> 927 <tr> 928 <td><tt>const</tt> mismatch with defaulted copy constructor</td> 929 <td><a href="https://wg21.link/p0641r2">P0641R2</a></td> 930 <td class="full" align="center">Clang 8</td> 931 </tr> 932 <tr> 933 <td rowspan="10">Consistent comparison (<tt>operator<=></tt>)</td> 934 <td><a href="https://wg21.link/p0515r3">P0515R3</a></td> 935 <td rowspan="8" class="full" align="center">Clang 10</td> 936 </tr> 937 <tr> <!-- from Jacksonville --> 938 <td><a href="https://wg21.link/p0905r1">P0905R1</a></td> 939 </tr> 940 <tr> <!-- from Rapperswil --> 941 <td><a href="https://wg21.link/p1120r0">P1120R0</a></td> 942 </tr> 943 <tr> <!-- from Kona 2019 --> 944 <td><a href="https://wg21.link/p1185r2">P1185R2</a></td> 945 </tr> 946 <tr> <!-- from Cologne --> 947 <td><a href="https://wg21.link/p1186r3">P1186R3</a></td> 948 </tr> 949 <tr> 950 <td><a href="https://wg21.link/p1630r1">P1630R1</a></td> 951 </tr> 952 <tr> <!-- from Belfast --> 953 <td><a href="https://wg21.link/p1946r0">P1946R0</a></td> 954 </tr> 955 <tr> 956 <td><a href="https://wg21.link/p1959r0">P1959R0</a></td> 957 </tr> 958 <tr> <!-- from Prague --> 959 <td><a href="https://wg21.link/p2002r1">P2002R1</a></td> 960 <td class="partial" align="center">Partial</td> 961 </tr> 962 <tr> 963 <td><a href="https://wg21.link/p2085r0">P2085R0</a></td> 964 <td class="none" align="center">No</td> 965 </tr> 966 <tr> 967 <td>Access checking on specializations</td> 968 <td><a href="https://wg21.link/p0692r1">P0692R1</a></td> 969 <td class="partial" align="center">Partial</td> 970 </tr> 971 <tr> 972 <td>Default constructible and assignable stateless lambdas</td> 973 <td><a href="https://wg21.link/p0624r2">P0624R2</a></td> 974 <td class="full" align="center">Clang 8</td> 975 </tr> 976 <tr> 977 <td>Lambdas in unevaluated contexts</td> 978 <td><a href="https://wg21.link/p0315r4">P0315R4</a></td> 979 <td class="none" align="center">No</td> 980 </tr> 981 <!-- Jacksonville papers --> 982 <tr> 983 <td><tt>[[no_unique_address]]</tt> attribute</td> 984 <td><a href="https://wg21.link/p0840r2">P0840R2</a></td> 985 <td class="full" align="center">Clang 9</td> 986 </tr> 987 <tr> 988 <td><tt>[[likely]]</tt> and <tt>[[unlikely]]</tt> attributes</td> 989 <td><a href="https://wg21.link/p0479r5">P0479R5</a></td> 990 <td class="none" align="center">No</td> 991 </tr> 992 <tr> 993 <td><tt>typename</tt> optional in more contexts</td> 994 <td><a href="https://wg21.link/p0634r3">P0634R3</a></td> 995 <td class="none" align="center">No</td> 996 </tr> 997 <tr> 998 <td>Pack expansion in lambda <i>init-capture</i></td> 999 <td><a href="https://wg21.link/p0780r2">P0780R2</a></td> 1000 <td class="full" align="center">Clang 9</td> 1001 </tr> 1002 <!-- Rapperswil papers --> 1003 <tr> 1004 <td rowspan="2">Class types as non-type template parameters</td> 1005 <td><a href="https://wg21.link/p0732r2">P0732R2</a></td> 1006 <td rowspan="2" class="none" align="center">No</td> 1007 </tr> 1008 <tr> <!-- from Belfast --> 1009 <td><a href="https://wg21.link/p1907r1">P1907R1</a></td> 1010 </tr> 1011 <tr> 1012 <td>Destroying operator delete</td> 1013 <td><a href="https://wg21.link/p0722r3">P0722R3</a></td> 1014 <td class="full" align="center">Clang 6</td> 1015 </tr> 1016 <tr> 1017 <td rowspan="7">Relaxations of <tt>constexpr</tt> restrictions</td> 1018 <td><a href="https://wg21.link/p1064r0">P1064R0</a></td> 1019 <td class="full" align="center">Clang 9</td> 1020 </tr> 1021 <tr> <!-- from San Diego --> 1022 <td><a href="https://wg21.link/p1002r1">P1002R1</a></td> 1023 <td class="full" align="center">Clang 8</td> 1024 </tr> 1025 <tr> 1026 <td><a href="https://wg21.link/p1327r1">P1327R1</a></td> 1027 <td rowspan="2" class="full" align="center">Clang 9</td> 1028 </tr> 1029 <tr> 1030 <td><a href="https://wg21.link/p1330r0">P1330R0</a></td> 1031 </tr> 1032 <tr> <!-- from Cologne --> 1033 <td><a href="https://wg21.link/p1331r2">P1331R2</a></td> 1034 <td rowspan="3" class="full" align="center">Clang 10</td> 1035 </tr> 1036 <tr> 1037 <td><a href="https://wg21.link/p1668r1">P1668R1</a></td> 1038 </tr> 1039 <tr> 1040 <td><a href="https://wg21.link/p0784r7">P0784R7</a></td> 1041 </tr> 1042 <tr> 1043 <td>Prohibit aggregates with user-declared constructors</td> 1044 <td><a href="https://wg21.link/p1008r1">P1008R1</a></td> 1045 <td class="full" align="center">Clang 8</td> 1046 </tr> 1047 <tr> 1048 <td>Feature test macros</td> 1049 <td><a href="https://wg21.link/p0941r2">P0941R2</a></td> 1050 <td class="full" align="center"><a href="#sd6">(see below)</a></td> 1051 </tr> 1052 <tr> 1053 <td><tt>explicit(bool)</tt></td> 1054 <td><a href="https://wg21.link/p0892r2">P0892R2</a></td> 1055 <td class="full" align="center">Clang 9</td> 1056 </tr> 1057 <!-- San Diego papers --> 1058 <tr> 1059 <td>Signed integers are two's complement</td> 1060 <td><a href="https://wg21.link/p1236r1">P1236R1</a></td> 1061 <td class="full" align="center">Clang 9</td> 1062 </tr> 1063 <tr> 1064 <td><tt>char8_t</tt></td> 1065 <td><a href="https://wg21.link/p0482r6">P0482R6</a></td> 1066 <td class="full" align="center">Clang 7 <a href="#p0482">(11)</a></td> 1067 </tr> 1068 <tr> 1069 <td rowspan=2>Immediate functions (<tt>consteval</tt>)</td> 1070 <td><a href="https://wg21.link/p1073r3">P1073R3</a></td> 1071 <td rowspan=2 class="none" align="center">No</td> 1072 </tr> 1073 <tr> <!-- from Prague --> 1074 <td><a href="https://wg21.link/p1937r2">P1937R2</a></td> 1075 </tr> 1076 <tr> 1077 <td><tt>std::is_constant_evaluated</tt></td> 1078 <td><a href="https://wg21.link/p0595r2">P0595R2</a></td> 1079 <td class="full" align="center">Clang 9</td> 1080 </tr> 1081 <tr> 1082 <td>Nested inline namespaces</td> 1083 <td><a href="https://wg21.link/p1094r2">P1094R2</a></td> 1084 <td class="full" align="center">Clang 8</td> 1085 </tr> 1086 <!-- Kona 2019 papers --> 1087 <tr> 1088 <td rowspan="2">Structured binding extensions</td> 1089 <td><a href="https://wg21.link/p1091r3">P1091R3</a></td> 1090 <td rowspan="2" class="partial" align="center">Partial</td> 1091 </tr> 1092 <tr> 1093 <td><a href="https://wg21.link/p1381r1">P1381R1</a></td> 1094 </tr> 1095 <tr> 1096 <td rowspan="2">Stronger Unicode requirements</td> 1097 <td><a href="https://wg21.link/p1041r4">P1041R4</a></td> 1098 <td rowspan="2" class="full" align="center">Yes</td> 1099 </tr> 1100 <tr> 1101 <td><a href="https://wg21.link/p1139r2">P1139R2</a></td> 1102 </tr> 1103 <tr> 1104 <td rowspan="2">Parenthesized initialization of aggregates</td> 1105 <td><a href="https://wg21.link/p0960r3">P0960R3</a></td> 1106 <td rowspan="2" class="none" align="center">No</td> 1107 </tr> 1108 <tr> <!-- from Belfast --> 1109 <td><a href="https://wg21.link/p1975r0">P1975R0</a></td> 1110 </tr> 1111 <tr> 1112 <td rowspan="10">Modules</td> 1113 <td><a href="https://wg21.link/p1103r3">P1103R3</a></td> 1114 <td class="partial" align="center">Partial</td> 1115 </tr> 1116 <tr> <!-- from Cologne --> 1117 <td><a href="https://wg21.link/p1766r1">P1766R1</a> (<a href="#dr">DR</a>)</td> 1118 <td class="unreleased" align="center">Clang 11</td> 1119 </tr> 1120 <tr> 1121 <td><a href="https://wg21.link/p1811r0">P1811R0</a></td> 1122 <td rowspan="2" class="none" align="center">No</td> 1123 </tr> 1124 <tr> 1125 <td><a href="https://wg21.link/p1703r1">P1703R1</a></td> 1126 </tr> 1127 <tr> <!-- from Belfast --> 1128 <td><a href="https://wg21.link/p1874r1">P1874R1</a></td> 1129 <td class="partial" align="center">Partial</td> 1130 </tr> 1131 <tr> <!-- from Belfast --> 1132 <td><a href="https://wg21.link/p1979r0">P1979R0</a></td> 1133 <td rowspan="3" class="none" align="center">No</td> 1134 </tr> 1135 <tr> <!-- from Prague --> 1136 <td><a href="https://wg21.link/p1779r3">P1779R3</a></td> 1137 </tr> 1138 <tr> 1139 <td><a href="https://wg21.link/p1857r3">P1857R3</a></td> 1140 </tr> 1141 <tr> 1142 <td><a href="https://wg21.link/p2115r0">P2115R0</a></td> 1143 <td class="partial" align="center">Partial</td> 1144 </tr> 1145 <tr> 1146 <td><a href="https://wg21.link/p1815r2">P1815R2</a></td> 1147 <td class="none" align="center">No</td> 1148 </tr> 1149 <tr> 1150 <td>Coroutines</td> 1151 <td><a href="https://wg21.link/p0912r5">P0912R5</a></td> 1152 <td class="partial" align="center">Partial</td> 1153 </tr> 1154 <!-- Cologne 2019 papers --> 1155 <tr> 1156 <td>Deprecate <tt>a[b,c]</tt></td> 1157 <td><a href="https://wg21.link/p1161r3">P1161R3</a></td> 1158 <td class="full" align="center">Clang 9</td> 1159 </tr> 1160 <tr> 1161 <td>Deprecate some problematic uses of <tt>volatile</tt></td> 1162 <td><a href="https://wg21.link/p1152r4">P1152R4</a></td> 1163 <td class="full" align="center">Clang 10</td> 1164 </tr> 1165 <tr> 1166 <td><tt>[[nodiscard("with reason")]]</tt></td> 1167 <td><a href="https://wg21.link/p1301r4">P1301R4</a></td> 1168 <td class="full" align="center">Clang 9</td> 1169 </tr> 1170 <tr> 1171 <td><tt>using enum</tt></td> 1172 <td><a href="https://wg21.link/p1099r5">P1099R5</a></td> 1173 <td class="none" align="center">No</td> 1174 </tr> 1175 <tr> 1176 <td rowspan=2>Class template argument deduction for aggregates</td> 1177 <td><a href="https://wg21.link/p1816r0">P1816R0</a></td> 1178 <td rowspan=2 class="none" align="center">No</td> 1179 </tr> 1180 <tr> <!-- from Prague --> 1181 <td><a href="https://wg21.link/p2082r1">P2082R1</a></td> 1182 </tr> 1183 <tr> 1184 <td>Class template argument deduction for alias templates</td> 1185 <td><a href="https://wg21.link/p1814r0">P1814R0</a></td> 1186 <td class="none" align="center">No</td> 1187 </tr> 1188 <tr> 1189 <td>Permit conversions to arrays of unknown bound</td> 1190 <td><a href="https://wg21.link/p0388r4">P0388R4</a></td> 1191 <td class="none" align="center">No</td> 1192 </tr> 1193 <tr> 1194 <td><tt>constinit</tt></td> 1195 <td><a href="https://wg21.link/p1143r2">P1143R2</a></td> 1196 <td class="full" align="center">Clang 10</td> 1197 </tr> 1198 <!-- Prague 2019 papers --> 1199 <tr> 1200 <td>Pseudo-destructors end object lifetimes</td> 1201 <td><a href="https://wg21.link/p0593r6">P0593R6</a> (<a href="#dr">DR</a>)</td> 1202 <td class="unreleased" align="center">Clang 11</td> 1203 </tr> 1204</table> 1205 1206<p> 1207<span id="p0482">(11): Prior to Clang 8, this feature is not enabled by 1208<tt>-std=c++20</tt>, but can be enabled with <tt>-fchar8_t</tt>. 1209</span> 1210</p> 1211</details> 1212 1213<h2 id="dr">Defect reports</h2> 1214 1215<p>Clang generally aims to implement resolutions to Defect Reports (bug fixes 1216against prior standards) retroactively, in all prior standard versions where 1217the fix is meaningful. Significant Defect Report changes to language features 1218after the publication of the relevant standard are marked (DR) in the above 1219table.</p> 1220 1221<p>Clang also has a test suite for conformance to resolutions for issues on the 1222<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_toc.html">C++ core issues list</a>, 1223most of which are considered Defect Reports. 1224<a href="cxx_dr_status.html">Implementation status for C++ core issues</a> based on 1225that test suite is tracked on a separate page.</p> 1226 1227<h2 id="ts">Technical specifications and standing documents</h2> 1228 1229<p>ISO C++ also publishes a number of documents describing additional language 1230and library features that are not part of standard C++.</p> 1231 1232<details open> 1233<summary>List of features and minimum Clang version with support</summary> 1234 1235<table width="689" border="1" cellspacing="0"> 1236 <tr> 1237 <th>Document</th> 1238 <th>Latest draft</th> 1239 <th>Compiler flag</th> 1240 <th>Available in Clang?</th> 1241 </tr> 1242 <tr id="sd6"> 1243 <td rowspan="7">SD-6: SG10 feature test recommendations</td> 1244 <td rowspan="7"><a href="https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations">SD-6</a></td> 1245 <td rowspan="7">N/A</td> 1246 <td class="full" align="center"> 1247 Clang 3.4 (<a href="https://wg21.link/n3745">N3745</a>)</br> 1248 </td> 1249 </tr> 1250 <tr> 1251 <td class="full" align="center"> 1252 Clang 3.6 (<a href="https://wg21.link/n4200">N4200</a>)</a> 1253 </td> 1254 </tr> 1255 <tr> 1256 <td class="full" align="center"> 1257 Clang 4 (<a href="https://wg21.link/p0096r3">P0096R3</a>)</a> 1258 </td> 1259 </tr> 1260 <tr> 1261 <td class="full" align="center"> 1262 Clang 5 (<a href="https://wg21.link/p0096r4">P0096R4</a>)</a> 1263 </td> 1264 </tr> 1265 <tr> 1266 <td class="full" align="center"> 1267 Clang 7 (<a href="https://wg21.link/p0096r5">P0096R5</a>)</a> 1268 </td> 1269 </tr> 1270 <tr> 1271 <td class="full" align="center"> 1272 Clang 9 (<a href="https://wg21.link/p1353r0">P1353R0</a>) 1273 </td> 1274 </tr> 1275 <tr> 1276 <td class="full" align="center"> 1277 Clang 10 (<a href="https://wg21.link/p1902r1">P1902R1</a>)</a> 1278 </td> 1279 </tr> 1280 <!-- No compiler support is known to be needed for: 1281 * Concurrency TS 1282 * Parallelism TS (v1, v2) 1283 * Ranges TS 1284 * Networking TS 1285 * File System TS 1286 --> 1287 <tr> 1288 <td>[TS] Concepts</td> 1289 <td><a href="https://wg21.link/p0121r0">P0121R0</a></td> 1290 <td></td> 1291 <td class="na" align="center">Superseded by <a href="#p0734">P0734R0</a></td> 1292 </tr> 1293 <tr> 1294 <!-- track unimplemented Coroutines features: p0913r1 p0914r1 p1356r0 --> 1295 <td rowspan="2">[TS] Coroutines</td> 1296 <td rowspan="2"><a href="https://isocpp.org/files/papers/N4663.pdf">N4663</a></td> 1297 <td><tt>-fcoroutines-ts<br>-stdlib=libc++</tt></td> 1298 <td class="full" align="center">Clang 5</td> 1299 </tr> 1300 <tr> 1301 <td><tt>-std=c++20<br>-stdlib=libc++</tt></td> 1302 <td class="na" align="center">Superseded by <a href="#p0912">P0912R5</a></td> 1303 </tr> 1304 <tr> 1305 <td>[TS] Library Fundamentals, Version 1 (invocation type traits)</td> 1306 <td><a href="https://wg21.link/n4480">N4480</a></td> 1307 <td>N/A</td> 1308 <td class="none" align="center">No</td> 1309 </tr> 1310 <tr> 1311 <td>[TS] Library Fundamentals, Version 2 (<tt>source_location</tt>)</td> 1312 <td><a href="https://wg21.link/n4617">N4617</a></td> 1313 <td>N/A</td> 1314 <td class="full" align="center">Clang 9 (<a href="docs/LanguageExtensions.html#source-location-builtins">documentation</a>)</td> 1315 </tr> 1316 <tr> 1317 <td>[TS] Modules</td> 1318 <td><a href="https://wg21.link/n4720">N4720</a></td> 1319 <td><tt>-fmodules-ts</tt></td> 1320 <td class="na" align="center">Superseded by <a href="#p1103">P1103R3</a></td> 1321 </tr> 1322 <tr> 1323 <td>[DRAFT TS] Reflection</td> 1324 <td><a href="https://wg21.link/n4818">N4818</a></td> 1325 <td></td> 1326 <td class="none" align="center">No</td> 1327 </tr> 1328 <tr> 1329 <td>[TS] Transactional Memory</td> 1330 <td><a href="https://wg21.link/n4514">N4514</a></td> 1331 <td></td> 1332 <td class="none" align="center">No</td> 1333 </tr> 1334</table> 1335</details> 1336 1337</div> 1338</body> 1339</html> 1340