1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 2 "http://www.w3.org/TR/html4/strict.dtd"> 3<html> 4<head> 5 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 6 <title>Clang - C++1z, C++14, C++11 and C++98 Status</title> 7 <link type="text/css" rel="stylesheet" href="menu.css"> 8 <link type="text/css" rel="stylesheet" href="content.css"> 9 <style type="text/css"> 10 .none { background-color: #FFCCCC } 11 .partial { background-color: #FFE0B0 } 12 .svn { background-color: #FFFF99 } 13 .full { background-color: #CCFF99 } 14 .na { background-color: #DDDDDD } 15 span:target { background-color: #FFFFBB; outline: #DDDD55 solid thin; } 16 th { background-color: #FFDDAA } 17 td { vertical-align: middle } 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<p>Last updated: $Date$</p> 30 31<p>Clang fully implements all published ISO C++ standards including <a 32href="#cxx11">C++11</a>, as well as the upcoming <a 33href="#cxx14">C++14</a> standard, and some parts of the fledgling <a 34href="#cxx17">C++1z</a> standard, 35and is considered a production-quality C++ compiler. 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="http://llvm.org/bugs/">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="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372">ISO 60 C++ 2011 standard</a>. The following table describes the Clang version 61 in which each feature became available.</p> 62 63<p>By default, Clang builds C++ code according to the C++98 standard, with many 64C++11 features accepted as extensions. You can use Clang in C++11 mode with the 65<code>-std=c++11</code> option. Clang's C++11 mode can be used 66with <a href="http://libcxx.llvm.org/">libc++</a> or with gcc's libstdc++, but 67patches are needed to make <a href="libstdc++4.4-clang0x.patch">libstdc++-4.4</a> 68work with Clang in C++11 mode. Patches are also needed to make 69<a href="libstdc++4.6-clang11.patch">libstdc++-4.6</a> 70and <a href="libstdc++4.7-clang11.patch">libstdc++-4.7</a> work with Clang 71releases prior to version 3.2 in C++11 mode. 72 73<table width="689" border="1" cellspacing="0"> 74 <tr> 75 <th>Language Feature</th> 76 <th>C++11 Proposal</th> 77 <th>Available in Clang?</th> 78 </tr> 79 <tr> 80 <td>Rvalue references</td> 81 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html">N2118</a></td> 82 <td class="full" align="center">Clang 2.9</td> 83 </tr> 84 <tr> 85 <td> Rvalue references for <code>*this</code></td> 86 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2439.htm">N2439</a></td> 87 <td class="full" align="center">Clang 2.9</td> 88 </tr> 89 <tr> 90 <td>Initialization of class objects by rvalues</td> 91 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1610.html">N1610</a></td> 92 <td class="full" align="center">Clang 2.9</td> 93 </tr> 94 <tr> 95 <td>Non-static data member initializers</td> 96 <td><a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2008/n2756.htm">N2756</a></td> 97 <td class="full" align="center">Clang 3.0</td> 98 </tr> 99 <tr> 100 <td>Variadic templates</td> 101 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf">N2242</a></td> 102 <td class="full" align="center">Clang 2.9</td> 103 </tr> 104 <tr> 105 <td> Extending variadic template template parameters</td> 106 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf">N2555</a></td> 107 <td class="full" align="center">Clang 2.9</td> 108 </tr> 109 <tr> 110 <td>Initializer lists</td> 111 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm">N2672</a></td> 112 <td class="full" align="center">Clang 3.1</td> 113 </tr> 114 <tr> 115 <td>Static assertions</td> 116 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html">N1720</a></td> 117 <td class="full" align="center">Clang 2.9</td> 118 </tr> 119 <tr> 120 <td><code>auto</code>-typed variables</td> 121 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf">N1984</a></td> 122 <td class="full" align="center">Clang 2.9</td> 123 </tr> 124 <tr> 125 <td> Multi-declarator <code>auto</code></td> 126 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1737.pdf">N1737</a></td> 127 <td class="full" align="center">Clang 2.9</td> 128 </tr> 129 <tr> 130 <td> Removal of auto as a storage-class specifier</td> 131 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2546.htm">N2546</a></td> 132 <td class="full" align="center">Clang 2.9</td> 133 </tr> 134 <tr> 135 <td> New function declarator syntax</td> 136 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm">N2541</a></td> 137 <td class="full" align="center">Clang 2.9</td> 138 </tr> 139 <tr> 140 <td>Lambda expressions</td> 141 <td><a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2927.pdf">N2927</a></td> 142 <td class="full" align="center">Clang 3.1</td> 143 </tr> 144 <tr> 145 <td>Declared type of an expression</td> 146 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf">N2343</a></td> 147 <td class="full" align="center">Clang 2.9</td> 148 </tr> 149 <tr> 150 <td> Incomplete return types</td> 151 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3276.pdf">N3276</a></td> 152 <td class="full" align="center">Clang 3.1</td> 153 </tr> 154 <tr> 155 <td>Right angle brackets</td> 156 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html">N1757</a></td> 157 <td class="full" align="center">Clang 2.9</td> 158 </tr> 159 <tr> 160 <td>Default template arguments for function templates</td> 161 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#226">DR226</a></td> 162 <td class="full" align="center">Clang 2.9</td> 163 </tr> 164 <tr> 165 <td>Solving the SFINAE problem for expressions</td> 166 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2634.html">DR339</a></td> 167 <td class="full" align="center">Clang 2.9</td> 168 </tr> 169 <tr> 170 <td>Alias templates</td> 171 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf">N2258</a></td> 172 <td class="full" align="center">Clang 3.0</td> 173 </tr> 174 <tr> 175 <td>Extern templates</td> 176 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1987.htm">N1987</a></td> 177 <td class="full" align="center">Clang 2.9</td> 178 </tr> 179 <tr> 180 <td>Null pointer constant</td> 181 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf">N2431</a></td> 182 <td class="full" align="center">Clang 3.0</td> 183 </tr> 184 <tr> 185 <td>Strongly-typed enums</td> 186 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf">N2347</a></td> 187 <td class="full" align="center">Clang 2.9</td> 188 </tr> 189 <tr> 190 <td>Forward declarations for enums</td> 191 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2764.pdf">N2764</a> 192 <br><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1206">DR1206</a></td> 193 <td class="full" align="center">Clang 3.1</td> 194 </tr> 195 <tr> 196 <td>Standardized attribute syntax</td> 197 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf">N2761</a></td> 198 <td class="full" align="center">Clang 3.3 <a href="#n2761">(1)</a></td> 199 </tr> 200 <tr> 201 <td>Generalized constant expressions</td> 202 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf">N2235</a></td> 203 <td class="full" align="center">Clang 3.1</td> 204 </tr> 205 <tr> 206 <td>Alignment support</td> 207 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf">N2341</a></td> 208 <td class="full" align="center">Clang 3.3</td> 209 </tr> 210 <tr> 211 <td>Conditionally-support behavior</td> 212 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1627.pdf">N1627</a></td> 213 <td class="full" align="center">Clang 2.9</td> 214 </tr> 215 <tr> 216 <td>Changing undefined behavior into diagnosable errors</td> 217 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1727.pdf">N1727</a></td> 218 <td class="full" align="center">Clang 2.9</td> 219 </tr> 220 <tr> 221 <td>Delegating constructors</td> 222 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf">N1986</a></td> 223 <td class="full" align="center">Clang 3.0</td> 224 </tr> 225 <tr> 226 <td>Inheriting constructors</td> 227 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm">N2540</a></td> 228 <td class="full" align="center">Clang 3.3</td> 229 </tr> 230 <tr> 231 <td>Explicit conversion operators</td> 232 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf">N2437</a></td> 233 <td class="full" align="center">Clang 3.0</td> 234 </tr> 235 <tr> 236 <td>New character types</td> 237 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2249.html">N2249</a></td> 238 <td class="full" align="center">Clang 2.9</td> 239 </tr> 240 <tr> 241 <td>Unicode string literals</td> 242 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm">N2442</a></td> 243 <td class="full" align="center">Clang 3.0</td> 244 </tr> 245 <tr> 246 <td>Raw string literals</td> 247 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm">N2442</a></td> 248 <td class="full" align="center">Clang 3.0</td> 249 </tr> 250 <tr> 251 <td>Universal character names in literals</td> 252 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html">N2170</a></td> 253 <td class="full" align="center">Clang 3.1</td> 254 </tr> 255 <tr> 256 <td>User-defined literals</td> 257 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf">N2765</a></td> 258 <td class="full" align="center">Clang 3.1</td> 259 </tr> 260 <tr> 261 <td>Standard Layout Types</td> 262 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2342.htm">N2342</a></td> 263 <td class="full" align="center">Clang 3.0</td> 264 </tr> 265 <tr> 266 <td>Defaulted functions</td> 267 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm">N2346</a></td> 268 <td class="full" align="center">Clang 3.0</td> 269 </tr> 270 <tr> 271 <td>Deleted functions</td> 272 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm">N2346</a></td> 273 <td class="full" align="center">Clang 2.9</td> 274 </tr> 275 <tr> 276 <td>Extended friend declarations</td> 277 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1791.pdf">N1791</a></td> 278 <td class="full" align="center">Clang 2.9</td> 279 </tr> 280 <tr> 281 <td>Extending <code>sizeof</code></td> 282 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html">N2253</a> 283 <br><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#850">DR850</a></td> 284 <td class="full" align="center">Clang 3.1</td> 285 </tr> 286 <tr> 287 <td>Inline namespaces</td> 288 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2535.htm">N2535</a></td> 289 <td class="full" align="center">Clang 2.9</td> 290 </tr> 291 <tr> 292 <td>Unrestricted unions</td> 293 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf">N2544</a></td> 294 <td class="full" align="center">Clang 3.1</td> 295 </tr> 296 <tr> 297 <td>Local and unnamed types as template arguments</td> 298 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm">N2657</a></td> 299 <td class="full" align="center">Clang 2.9</td> 300 </tr> 301 <tr> 302 <td>Range-based for</td> 303 <td><a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2930.html">N2930</a></td> 304 <td class="full" align="center">Clang 3.0</td> 305 </tr> 306 <tr> 307 <td>Explicit virtual overrides</td> 308 <td><a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm">N2928</a> 309 <br><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm">N3206</a> 310 <br><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm">N3272</a></td> 311 <td class="full" align="center">Clang 3.0</td> 312 </tr> 313 <tr> 314 <td>Minimal support for garbage collection and reachability-based leak detection</td> 315 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2670.htm">N2670</a></td> 316 <td class="na" align="center">N/A <a href="#n2670">(2)</a></td> 317 </tr> 318 <tr> 319 <td>Allowing move constructors to throw [noexcept]</td> 320 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3050.html">N3050</a></td> 321 <td class="full" align="center">Clang 3.0</td> 322 </tr> 323 <tr> 324 <td>Defining move special member functions</td> 325 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3053.html">N3053</a></td> 326 <td class="full" align="center">Clang 3.0</td> 327 </tr> 328 329 <tr class="separator"> 330 <th align="center" colspan="3">Concurrency</th> 331 </tr> 332 <tr> 333 <td>Sequence points</td> 334 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html">N2239</a></td> 335 <td class="full" align="center">Clang 3.3</td> 336 </tr> 337 <tr> 338 <td>Atomic operations</td> 339 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html">N2427</a></td> 340 <td class="full" align="center">Clang 3.1</td> 341 </tr> 342 <tr> 343 <td>Strong Compare and Exchange</td> 344 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2748.html">N2748</a></td> 345 <td class="full" align="center">Clang 3.1 <a href="#n2748">(3)</a></td> 346 </tr> 347 <tr> 348 <td>Bidirectional Fences</td> 349 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2752.htm">N2752</a></td> 350 <td class="full" align="center">Clang 3.1</td> 351 </tr> 352 353 <tr> 354 <td>Memory model</td> 355 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2429.htm">N2429</a></td> 356 <td class="full" align="center">Clang 3.2</td> 357 </tr> 358 <tr> 359 <td>Data-dependency ordering: atomics and memory model</td> 360 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2664.htm">N2664</a></td> 361 <td class="full" align="center">Clang 3.2 <a href="#n2664">(4)</a></td> 362 </tr> 363 <tr> 364 <td>Propagating exceptions</td> 365 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html">N2179</a></td> 366 <td class="full" align="center">Clang 2.9</td> 367 </tr> 368 <tr> 369 <td>Allow atomics use in signal handlers</td> 370 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2547.htm">N2547</a></td> 371 <td class="full" align="center">Clang 3.1</td> 372 </tr> 373 <tr> 374 <td>Thread-local storage</td> 375 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm">N2659</a></td> 376 <td class="full" align="center">Clang 3.3 <a href="#n2659">(5)</a></td> 377 </tr> 378 <tr> 379 <td>Dynamic initialization and destruction with concurrency</td> 380 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm">N2660</a></td> 381 <td class="full" align="center">Clang 2.9</td> 382 </tr> 383 384 <tr class="separator"> 385 <th align="center" colspan="3">C99 Features in C++11</th> 386 </tr> 387 <tr> 388 <td><code>__func__</code> predefined identifier</td> 389 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2340.htm">N2340</a></td> 390 <td class="full" align="center">Clang 2.9</td> 391 </tr> 392 <tr> 393 <td>C99 preprocessor</td> 394 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm">N1653</a></td> 395 <td class="full" align="center">Clang 2.9</td> 396 </tr> 397 <tr> 398 <td><code>long long</code></td> 399 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1811.pdf">N1811</a></td> 400 <td class="full" align="center">Clang 2.9</td> 401 </tr> 402 <tr> 403 <td>Extended integral types</td> 404 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1988.pdf">N1988</a></td> 405 <td class="na" align="center">N/A <a href="#n1988">(6)</a></td> 406 </tr> 407</table> 408 409<p> 410<span id="n2761">(1): The <code>[[carries_dependency]]</code> attribute 411has no effect.</span><br> 412<span id="n2670">(2): No compiler changes are required for an implementation 413such as Clang that does not provide garbage collection.</span><br> 414<span id="n2748">(3): All compare-exchange operations are emitted as 415strong compare-exchanges.</span><br> 416<span id="n2664">(4): <code>memory_order_consume</code> is lowered to 417<code>memory_order_acquire</code>.</span><br> 418<span id="n2659">(5): <code>thread_local</code> support 419requires a C++ runtime library providing <code>__cxa_thread_atexit</code>, such 420as <a href="http://libcxxabi.llvm.org">libc++abi</a> 3.6 or later, 421or libsupc++ 4.8 or later.</span><br> 422<span id="n1988">(6): No compiler changes are required for an implementation 423such as Clang that does not provide any extended integer types. 424<code>__int128</code> is not treated as an extended integer type, 425because changing <code>intmax_t</code> would be an ABI-incompatible 426change.</span> 427</p> 428 429<h2 id="cxx14">C++14 implementation status</h2> 430 431<p>Clang 3.4 and later implement all of the Draft International Standard (see <a 432href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3797.pdf">most 433recent publicly available draft</a>) 434of the upcoming C++14 language standard. The following table describes the 435Clang version in which each feature became available.</p> 436 437<p>You can use Clang in C++14 mode with the <code>-std=c++14</code> option 438(use <code>-std=c++1y</code> in Clang 3.4 and earlier).</p> 439 440<table width="689" border="1" cellspacing="0"> 441 <tr> 442 <th>Language Feature</th> 443 <th>C++14 Proposal</th> 444 <th>Available in Clang?</th> 445 </tr> 446 <tr> 447 <td>Tweak to certain C++ contextual conversions</td> 448 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3323.pdf">N3323</a></td> 449 <td class="full" align="center">Clang 3.4</td> 450 </tr> 451 <tr> 452 <td>Binary literals</td> 453 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3472.pdf">N3472</a></td> 454 <td class="full" align="center">Clang 2.9</td> 455 </tr> 456 <tr> 457 <td>decltype(auto)</td> 458 <td rowspan=2 style="vertical-align:middle"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3638.html">N3638</a></td> 459 <td class="full" align="center">Clang 3.3</td> 460 </tr> 461 <tr> 462 <td>Return type deduction for normal functions</td> 463 <td class="full" align="center">Clang 3.4</td> 464 </tr> 465 <tr> 466 <td>Initialized lambda captures</td> 467 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3648.html">N3648</a></td> 468 <td class="full" align="center">Clang 3.4</td> 469 </tr> 470 <tr> 471 <td>Generic lambdas</td> 472 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3649.html">N3649</a></td> 473 <td class="full" align="center">Clang 3.4</td> 474 </tr> 475 <tr> 476 <td>Variable templates</td> 477 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3651.pdf">N3651</a></td> 478 <td class="full" align="center">Clang 3.4</td> 479 </tr> 480 <tr> 481 <td>Relaxing requirements on constexpr functions</td> 482 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3652.html">N3652</a></td> 483 <td class="full" align="center">Clang 3.4</td> 484 </tr> 485 <tr> 486 <td>Member initializers and aggregates</td> 487 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html">N3653</a></td> 488 <td class="full" align="center">Clang 3.3</td> 489 </tr> 490 <tr> 491 <td>Clarifying memory allocation</td> 492 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3664.html">N3664</a></td> 493 <td class="full" align="center">Clang 3.4</td> 494 </tr> 495 <tr> 496 <td><tt>[[deprecated]]</tt> attribute</td> 497 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3760.html">N3760</a></td> 498 <td class="full" align="center">Clang 3.4</td> 499 </tr> 500 <tr> 501 <td>Single quotation mark as digit separator</td> 502 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3781.pdf">N3781</a></td> 503 <td class="full" align="center">Clang 3.4</td> 504 </tr> 505 <tr> 506 <td>C++ Sized Deallocation</td> 507 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3778.html">N3778</a></td> 508 <td class="full" align="center">Clang 3.4 <a href="#n3778">(7)</a></td> 509 </tr> 510</table> 511 512<p> 513<span id="n3778">(7): In Clang 3.7 and later, sized deallocation is only enabled 514if the user passes the <code>-fsized-deallocation</code> flag. The user must 515supply definitions of the sized deallocation functions, either by providing them 516explicitly or by using a C++ standard library that does. <code>libstdc++</code> 517added these functions in version 5.0, and <code>libc++</code> added them in 518version 3.7. 519</span> 520</p> 521 522<h2 id="cxx17">C++1z implementation status</h2> 523 524<p>Clang has <b>experimental</b> support for some proposed features of 525the C++ standard following C++14, provisionally named C++1z. 526The following table describes which C++1z features 527have been implemented in Clang and in which Clang version they became 528available.</p> 529 530<p>Note that support for these features may change or be removed without notice, 531as the draft C++1z standard evolves.</p> 532 533<p>You can use Clang in C++1z mode with the <code>-std=c++1z</code> option.</p> 534 535<table width="689" border="1" cellspacing="0"> 536 <tr> 537 <th>Language Feature</th> 538 <th>C++1z Proposal</th> 539 <th>Available in Clang?</th> 540 </tr> 541 <!-- Issaquah papers --> 542 <tr> 543 <td><tt>static_assert</tt> with no message</td> 544 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3928.pdf">N3928</a></td> 545 <td class="full" align="center">Clang 3.5</td> 546 </tr> 547 <!-- Rapperswil papers --> 548 <tr> 549 <td>Disabling trigraph expansion by default</td> 550 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4086.html">N4086</a></td> 551 <td class="full" align="center">Clang 3.5</td> 552 </tr> 553 <!-- 554 <tr> 555 <td rowspan="2">Terse range-based for loops (removed from C++1z)</td> 556 <td rowspan="2"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3994.htm">N3994</a></td> 557 <td class="none" align="center">Clang 3.5: Yes</td> 558 </tr> 559 <tr> 560 <td class="svn" align="center">SVN: No</td> 561 </tr> 562 --> 563 <tr> 564 <td><tt>typename</tt> in a template template parameter</td> 565 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4051.html">N4051</a></td> 566 <td class="full" align="center">Clang 3.5</td> 567 </tr> 568 <tr> 569 <td>New <tt>auto</tt> rules for direct-list-initialization 570 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3922.html">N3922</a></td> 571 <td class="full" align="center">Clang 3.8 <a href="#n3922">(8)</a></td> 572 </tr> 573 <!-- Urbana papers --> 574 <tr> 575 <td rowspan="2">Fold expressions</td> 576 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4295.html">N4295</a></td> 577 <td class="full" align="center">Clang 3.6</td> 578 </tr> 579 <tr> <!-- from Jacksonville --> 580 <td><a href="http://wg21.link/p0036r0">P0036R0</a></td> 581 <td class="svn" align="center">SVN</td> 582 </tr> 583 <tr> 584 <td><tt>u8</tt> character literals</td> 585 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4267.html">N4267</a></td> 586 <td class="full" align="center">Clang 3.6</td> 587 </tr> 588 <tr> 589 <td>Nested namespace definition</td> 590 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4230.html">N4230</a></td> 591 <td class="full" align="center">Clang 3.6</td> 592 </tr> 593 <tr> 594 <td>Attributes for namespaces and enumerators</td> 595 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4266.html">N4266</a></td> 596 <td class="full" align="center">Clang 3.6</td> 597 </tr> 598 <tr> 599 <td>Allow constant evaluation for all non-type template arguments</td> 600 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4268.html">N4268</a></td> 601 <td class="full" align="center">Clang 3.6</td> 602 </tr> 603 <!-- Kona papers --> 604 <tr> 605 <td>Remove deprecated <tt>register</tt> storage class</td> 606 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0001r1.html">P0001R1</a></td> 607 <td class="full" align="center">Clang 3.8</td> 608 </tr> 609 <tr> 610 <td>Remove deprecated <tt>bool</tt> increment</td> 611 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0002r1.html">P0002R1</a></td> 612 <td class="full" align="center">Clang 3.8</td> 613 </tr> 614 <tr> 615 <td>Make exception specifications part of the type system</td> 616 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0012r1.html">P0012R1</a></td> 617 <td class="none" align="center">No</td> 618 </tr> 619 <tr> 620 <td><tt>__has_include</tt> in preprocessor conditionals</td> 621 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0061.html">P0061R1</a></td> 622 <td class="full" align="center">Yes</td> 623 </tr> 624 <tr> 625 <td>New specification for inheriting constructors (<a href="cxx_dr_status.html#1941">DR1941</a> et al)</td> 626 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0136r1.html">P0136R1</a></td> 627 <td class="svn" align="center">SVN <a href="#p0136">(9)</a></td> 628 </tr> 629 <!-- Jacksonville papers --> 630 <tr> 631 <td><tt>[[fallthrough]]</tt> attribute</td> 632 <td><a href="http://wg21.link/p0188r1">P0188R1</a></td> 633 <td class="svn" align="center">SVN</td> 634 </tr> 635 <tr> 636 <td><tt>[[nodiscard]]</tt> attribute</td> 637 <td><a href="http://wg21.link/p0189r1">P0189R1</a></td> 638 <td class="svn" align="center">SVN</td> 639 </tr> 640 <tr> 641 <td><tt>[[maybe_unused]]</tt> attribute</td> 642 <td><a href="http://wg21.link/p0212r1">P0212R1</a></td> 643 <td class="svn" align="center">SVN</td> 644 </tr> 645 <tr> 646 <td>Aggregate initialization of classes with base classes</td> 647 <td><a href="http://wg21.link/p0017r1">P0017R1</a></td> 648 <td class="svn" align="center">SVN</td> 649 </tr> 650 <tr> 651 <td><tt>constexpr</tt> lambda expressions</td> 652 <td><a href="http://wg21.link/p0170r1">P0170R1</a></td> 653 <td class="none" align="center">No</td> 654 </tr> 655 <tr> 656 <td>Differing <tt>begin</tt> and <tt>end</tt> types in range-based <tt>for</tt></td> 657 <td><a href="http://wg21.link/p0184r0">P0184R0</a></td> 658 <td class="svn" align="center">SVN</td> 659 </tr> 660 <tr> 661 <td>Lambda capture of <tt>*this</tt></td> 662 <td><a href="http://wg21.link/p0018r3">P0018R3</a></td> 663 <td class="svn" align="center">SVN</td> 664 </tr> 665 <tr> 666 <td>Direct-list-initialization of <tt>enum</tt>s</td> 667 <td><a href="http://wg21.link/p0138r2">P0138R2</a></td> 668 <td class="svn" align="center">SVN</td> 669 </tr> 670 <tr> 671 <td>Hexadecimal floating-point literals</td> 672 <td><a href="http://wg21.link/p0245r1">P0245R1</a></td> 673 <td class="full" align="center">Yes</td> 674 </tr> 675 <!-- Oulu papers --> 676 <tr> 677 <td>Using attribute namespaces without repetition</td> 678 <td><a href="http://wg21.link/p0028r4">P0028R4</a></td> 679 <td class="svn" align="center">SVN</td> 680 </tr> 681 <tr> 682 <td>Dynamic memory allocation for over-aligned data</td> 683 <td><a href="http://wg21.link/p0035r4">P0035R4</a></td> 684 <td class="none" align="center">No</td> 685 </tr> 686 <tr> 687 <td>Template argument deduction for class templates</td> 688 <td><a href="http://wg21.link/p0091r3">P0091R3</a></td> 689 <td class="none" align="center">No</td> 690 </tr> 691 <tr> 692 <td>Non-type template parameters with <tt>auto</tt> type</td> 693 <td><a href="http://wg21.link/p0127r2">P0127R2</a></td> 694 <td class="none" align="center">No</td> 695 </tr> 696 <tr> 697 <td>Guaranteed copy elision</td> 698 <td><a href="http://wg21.link/p0135r1">P0135R1</a></td> 699 <td class="none" align="center">No</td> 700 </tr> 701 <tr> 702 <td rowspan=2>Stricter expression evaluation order</td> 703 <td><a href="http://wg21.link/p0145r3">P0145R3</a></td> 704 <td class="none" align="center" rowspan=2>No</td> 705 </tr> 706 <tr> 707 <td><a href="http://wg21.link/p0400r0">P0400R0</a></td> 708 </tr> 709 <tr> 710 <td>Requirement to ignore unknown attributes</td> 711 <td><a href="http://wg21.link/p0283r2">P0283R2</a></td> 712 <td class="full" align="center">Yes</td> 713 </tr> 714 <tr> 715 <td><tt>constexpr</tt> <em>if-statement</em>s</td> 716 <td><a href="http://wg21.link/p0292r2">P0292R2</a></td> 717 <td class="svn" align="center">SVN</td> 718 </tr> 719 <tr> 720 <td>Inline variables</td> 721 <td><a href="http://wg21.link/p0386r2">P0386R2</a></td> 722 <td class="svn" align="center">SVN</td> 723 </tr> 724 <tr> 725 <td>Structured bindings</td> 726 <td><a href="http://wg21.link/p0217r3">P0217R3</a></td> 727 <td class="none" align="center">No</td> 728 </tr> 729 <tr> 730 <td>Separate variable and condition for <tt>if</tt> and <tt>switch</tt></td> 731 <td><a href="http://wg21.link/p0305r1">P0305R1</a></td> 732 <td class="svn" align="center">SVN</td> 733 </tr> 734</table> 735 736<p> 737<span id="n3922">(8): This is a backwards-incompatible change that is applied to 738all language versions that allow type deduction from <tt>auto</tt> 739(per the request of the C++ committee). 740In Clang 3.7, a warning is emitted for all cases that would change meaning. 741</span><br> 742<span id="p0136">(9): This is the resolution to a Defect Report, so is applied 743to all language versions supporting inheriting constructors. 744</span> 745</p> 746 747<h2 id="ts">Technical specifications and standing documents</h2> 748 749<p>ISO C++ also publishes a number of documents describing additional language 750and library features that are not part of standard C++. The following table 751describes which language features have been implemented in Clang and in which 752Clang version they became available:</p> 753 754<table width="689" border="1" cellspacing="0"> 755 <tr> 756 <th>Document</th> 757 <th>Latest draft</th> 758 <th>Available in Clang?</th> 759 </tr> 760 <tr> 761 <td rowspan="2">SD-6: SG10 feature test recommendations</td> 762 <td rowspan="2"><a href="http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations">SD-6</a></td> 763 <td class="full" align="center"> 764 Clang 3.4 (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3745">N3745</a>)</br> 765 </td> 766 </tr> 767 <tr> 768 <td class="full" align="center"> 769 Clang 3.6 (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4200">N4200</a>)</a> 770 </td> 771 </tr> 772 <!-- FIXME: Implement latest recommendations. 773 <tr> 774 <td class="svn" align="center"> 775 SVN (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0096r0">P0096R0</a>)</a> 776 </td> 777 </tr> 778 --> 779 <!-- No compiler support is known to be needed for: 780 * Concurrency TS 781 * Parallelism TS 782 * Ranges TS 783 * Networking TS 784 * File System TS 785 --> 786 <tr> 787 <td>[TS] Concepts</td> 788 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0121r0.pdf">P0121R0</a></td> 789 <td class="none" align="center">No</td> 790 </tr> 791 <tr> 792 <td>[TS] Library Fundamentals, Version 1 (invocation type traits)</td> 793 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4480.html">N4480</a></td> 794 <td class="none" align="center">No</td> 795 </tr> 796 <tr> 797 <td>[DRAFT TS] Library Fundamentals, Version 2 (<tt>source_location</tt>)</td> 798 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4529.html">N4529</a></td> 799 <td class="none" align="center">No</td> 800 </tr> 801 <tr> 802 <td>[TS] Modules</td> 803 <td><a href="http://wg21.link/p0143r2">P0143R2</a></td> 804 <td class="none" align="center">No</td> 805 </tr> 806 <tr> 807 <td>[TS] Transactional Memory</td> 808 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4514.pdf">N4514</a></td> 809 <td class="none" align="center">No</td> 810 </tr> 811</table> 812 813</div> 814</body> 815</html> 816