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