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 </style> 18 </head> 19 <body> 20 21 <!--#include virtual="menu.html.incl"--> 22 23 <div id="content"> 24 25 <!--*************************************************************************--> 26 <h1>C++ Support in Clang</h1> 27 <!--*************************************************************************--> 28 <p>Last updated: $Date$</p> 29 30 <p>Clang fully implements all published ISO C++ standards including <a 31 href="#cxx11">C++11</a>, as well as the upcoming <a 32 href="#cxx14">C++14</a> standard, and some parts of the fledgling <a 33 href="#cxx17">C++1z</a> standard, 34 and is considered a production-quality C++ compiler. 35 36 <p>The Clang community is continually striving to improve C++ standards 37 compliance between releases by submitting and tracking <a 38 href="cxx_dr_status.html">C++ Defect Reports</a> and implementing resolutions 39 as they become available.</p> 40 41 <p>Experimental work is also under way to implement <a href="#ts">C++ Technical 42 Specifications</a> that will help drive the future of the C++ programming 43 language.</p> 44 45 <p>The <a href="http://llvm.org/bugs/">LLVM bug tracker</a> contains Clang 46 C++ components that track known bugs with Clang's language conformance in 47 each language mode.</p> 48 49 <h2 id="cxx98">C++98 implementation status</h2> 50 51 <p>Clang implements all of the ISO C++ 1998 standard 52 (including the defects addressed in the ISO C++ 2003 standard) 53 except for <tt>export</tt> (which was removed in C++11). 54 55 <h2 id="cxx11">C++11 implementation status</h2> 56 57 <p>Clang 3.3 and later implement all of the <a 58 href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372">ISO 59 C++ 2011 standard</a>. The following table describes the Clang version 60 in which each feature became available.</p> 61 62 <p>By default, Clang builds C++ code according to the C++98 standard, with many 63 C++11 features accepted as extensions. You can use Clang in C++11 mode with the 64 <code>-std=c++11</code> option. Clang's C++11 mode can be used 65 with <a href="http://libcxx.llvm.org/">libc++</a> or with gcc's libstdc++, but 66 patches are needed to make <a href="libstdc++4.4-clang0x.patch">libstdc++-4.4</a> 67 work with Clang in C++11 mode. Patches are also needed to make 68 <a href="libstdc++4.6-clang11.patch">libstdc++-4.6</a> 69 and <a href="libstdc++4.7-clang11.patch">libstdc++-4.7</a> work with Clang 70 releases prior to version 3.2 in C++11 mode. <tt>thread_local</tt> support 71 currently requires the C++ runtime library from g++-4.8 or later.</p> 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</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">(5)</a></td> 406 </tr> 407 </table> 408 409 <p> 410 <span id="n2761">(1): The <code>[[carries_dependency]]</code> attribute 411 has no effect.</span><br> 412 <span id="n2670">(2): No compiler changes are required for an implementation 413 such as Clang that does not provide garbage collection.</span><br> 414 <span id="n2748">(3): All compare-exchange operations are emitted as 415 strong 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="n1988">(5): No compiler changes are required for an implementation 419 such as Clang that does not provide any extended integer types. 420 <code>__int128</code> is not treated as an extended integer type, 421 because changing <code>intmax_t</code> would be an ABI-incompatible 422 change.</span> 423 </p> 424 425 <h2 id="cxx14">C++14 implementation status</h2> 426 427 <p>Clang 3.4 and later implement all of the Draft International Standard (see <a 428 href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3797.pdf">most 429 recent publicly available draft</a>) 430 of the upcoming C++14 language standard. The following table describes the 431 Clang version in which each feature became available.</p> 432 433 <p>You can use Clang in C++14 mode with the <code>-std=c++14</code> option 434 (use <code>-std=c++1y</code> in Clang 3.4 and earlier).</p> 435 436 <table width="689" border="1" cellspacing="0"> 437 <tr> 438 <th>Language Feature</th> 439 <th>C++14 Proposal</th> 440 <th>Available in Clang?</th> 441 </tr> 442 <tr> 443 <td>Tweak to certain C++ contextual conversions</td> 444 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3323.pdf">N3323</a></td> 445 <td class="full" align="center">Clang 3.4</td> 446 </tr> 447 <tr> 448 <td>Binary literals</td> 449 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3472.pdf">N3472</a></td> 450 <td class="full" align="center">Clang 2.9</td> 451 </tr> 452 <tr> 453 <td>decltype(auto)</td> 454 <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> 455 <td class="full" align="center">Clang 3.3</td> 456 </tr> 457 <tr> 458 <td>Return type deduction for normal functions</td> 459 <td class="full" align="center">Clang 3.4</td> 460 </tr> 461 <tr> 462 <td>Initialized lambda captures</td> 463 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3648.html">N3648</a></td> 464 <td class="full" align="center">Clang 3.4</td> 465 </tr> 466 <tr> 467 <td>Generic lambdas</td> 468 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3649.html">N3649</a></td> 469 <td class="full" align="center">Clang 3.4</td> 470 </tr> 471 <tr> 472 <td>Variable templates</td> 473 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3651.pdf">N3651</a></td> 474 <td class="full" align="center">Clang 3.4</td> 475 </tr> 476 <tr> 477 <td>Relaxing requirements on constexpr functions</td> 478 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3652.html">N3652</a></td> 479 <td class="full" align="center">Clang 3.4</td> 480 </tr> 481 <tr> 482 <td>Member initializers and aggregates</td> 483 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html">N3653</a></td> 484 <td class="full" align="center">Clang 3.3</td> 485 </tr> 486 <tr> 487 <td>Clarifying memory allocation</td> 488 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3664.html">N3664</a></td> 489 <td class="full" align="center">Clang 3.4</td> 490 </tr> 491 <tr> 492 <td><tt>[[deprecated]]</tt> attribute</td> 493 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3760.html">N3760</a></td> 494 <td class="full" align="center">Clang 3.4</td> 495 </tr> 496 <tr> 497 <td>Single quotation mark as digit separator</td> 498 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3781.pdf">N3781</a></td> 499 <td class="full" align="center">Clang 3.4</td> 500 </tr> 501 <tr> 502 <td>C++ Sized Deallocation</td> 503 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3778.html">N3778</a></td> 504 <td class="full" align="center">Clang 3.4 <a href="#n3778">(6)</a></td> 505 </tr> 506 </table> 507 508 <p> 509 <span id="n3778">(6): In Clang 3.7 and later, sized deallocation is only enabled 510 if the user passes the <code>-fsized-deallocation</code> flag. The user must 511 supply definitions of the sized deallocation functions, either by providing them 512 explicitly or by using a C++ standard library that does. <code>libstdc++</code> 513 added these functions in version 5.0, and <code>libc++</code> added them in 514 version 3.7. 515 </span> 516 </p> 517 518 <h2 id="cxx17">C++1z implementation status</h2> 519 520 <p>Clang has <b>highly experimental</b> support for some proposed features of 521 the C++ standard following C++14, 522 provisionally named C++1z. The following table describes which C++1z features 523 have been implemented in Clang and in which Clang version they became 524 available.</p> 525 526 <p>Note that support for these features may change or be removed without notice, 527 as the draft C++1z standard evolves.</p> 528 529 <p>You can use Clang in C++1z mode with the <code>-std=c++1z</code> option.</p> 530 531 <table width="689" border="1" cellspacing="0"> 532 <tr> 533 <th>Language Feature</th> 534 <th>C++1z Proposal</th> 535 <th>Available in Clang?</th> 536 </tr> 537 <!-- Issaquah papers --> 538 <tr> 539 <td><tt>static_assert</tt> with no message</td> 540 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3928.pdf">N3928</a></td> 541 <td class="full" align="center">Clang 3.5</td> 542 </tr> 543 <!-- Rapperswil papers --> 544 <tr> 545 <td>Disabling trigraph expansion by default</td> 546 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4086.html">N4086</a></td> 547 <td class="full" align="center">Clang 3.5</td> 548 </tr> 549 <!-- 550 <tr> 551 <td rowspan="2">Terse range-based for loops (removed from C++1z)</td> 552 <td rowspan="2"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3994.htm">N3994</a></td> 553 <td class="none" align="center">Clang 3.5: Yes</td> 554 </tr> 555 <tr> 556 <td class="svn" align="center">SVN: No</td> 557 </tr> 558 --> 559 <tr> 560 <td><tt>typename</tt> in a template template parameter</td> 561 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4051.html">N4051</a></td> 562 <td class="full" align="center">Clang 3.5</td> 563 </tr> 564 <tr> 565 <td>New <tt>auto</tt> rules for direct-list-initialization 566 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3922.html">N3922</a></td> 567 <td class="svn" align="center">Clang 3.8 <a href="#n3922">(7)</a></td> 568 </tr> 569 <!-- Urbana papers --> 570 <tr> 571 <td>Fold expressions</td> 572 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4295.html">N4295</a></td> 573 <td class="full" align="center">Clang 3.6</td> 574 </tr> 575 <tr> 576 <td><tt>u8</tt> character literals</td> 577 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4267.html">N4267</a></td> 578 <td class="full" align="center">Clang 3.6</td> 579 </tr> 580 <tr> 581 <td>Nested namespace definition</td> 582 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4230.html">N4230</a></td> 583 <td class="full" align="center">Clang 3.6</td> 584 </tr> 585 <tr> 586 <td>Attributes for namespaces and enumerators</td> 587 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4266.html">N4266</a></td> 588 <td class="full" align="center">Clang 3.6</td> 589 </tr> 590 <tr> 591 <td>Allow constant evaluation for all non-type template arguments</td> 592 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4268.html">N4268</a></td> 593 <td class="full" align="center">Clang 3.6</td> 594 </tr> 595 <!-- Kona papers --> 596 <tr> 597 <td>Remove deprecated <tt>register</tt> storage class</td> 598 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0001r1.html">P0001R1</a></td> 599 <td class="svn" align="center">Clang 3.8</td> 600 </tr> 601 <tr> 602 <td>Remove deprecated <tt>bool</tt> increment</td> 603 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0002r1.html">P0002R1</a></td> 604 <td class="svn" align="center">Clang 3.8</td> 605 </tr> 606 <tr> 607 <td>Make exception specifications part of the type system</td> 608 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0012r1.html">P0012R1</a></td> 609 <td class="none" align="center">No</td> 610 </tr> 611 <tr> 612 <td><tt>__has_include</tt> in preprocessor conditionals</td> 613 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0061.html">P0061R1</a></td> 614 <td class="full" align="center">Yes</td> 615 </tr> 616 </table> 617 618 <p> 619 <span id="n3922">(7): This is a backwards-incompatible change that is applied to 620 all language versions that allow type deduction from <tt>auto</tt> 621 (per the request of the C++ committee). 622 In Clang 3.7, a warning is emitted for all cases that would change meaning. 623 </span> 624 </p> 625 626 <h2 id="ts">Technical specifications and standing documents</h2> 627 628 <p>ISO C++ also publishes a number of documents describing additional language 629 and library features that are not part of standard C++. The following table 630 describes which language features have been implemented in Clang and in which 631 Clang version they became available:</p> 632 633 <table width="689" border="1" cellspacing="0"> 634 <tr> 635 <th>Document</th> 636 <th>Latest draft</th> 637 <th>Available in Clang?</th> 638 </tr> 639 <tr> 640 <td rowspan="2">SD-6: SG10 feature test recommendations</td> 641 <td rowspan="2"><a href="http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations">SD-6</a></td> 642 <td class="full" align="center"> 643 Clang 3.4 (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3745">N3745</a>)</br> 644 </td> 645 </tr> 646 <tr> 647 <td class="full" align="center"> 648 Clang 3.6 (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4200">N4200</a>)</a> 649 </td> 650 </tr> 651 <!-- FIXME: Implement latest recommendations. 652 <tr> 653 <td class="svn" align="center"> 654 SVN (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0096r0">P0096R0</a>)</a> 655 </td> 656 </tr> 657 --> 658 <!-- No compiler support is known to be needed for: 659 * Concurrency TS 660 * Parallelism TS 661 * Ranges TS 662 * Networking TS 663 * File System TS 664 --> 665 <tr> 666 <td>[TS] Concepts</td> 667 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0121r0.pdf">P0121R0</a></td> 668 <td class="none" align="center">No</td> 669 </tr> 670 <tr> 671 <td>[TS] Library Fundamentals, Version 1 (invocation type traits)</td> 672 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4480.html">N4480</a></td> 673 <td class="none" align="center">No</td> 674 </tr> 675 <tr> 676 <td>[DRAFT TS] Library Fundamentals, Version 2 (<tt>source_location</tt>)</td> 677 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4529.html">N4529</a></td> 678 <td class="none" align="center">No</td> 679 </tr> 680 <tr> 681 <td>[TS] Transactional Memory</td> 682 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4514.pdf">N4514</a></td> 683 <td class="none" align="center">No</td> 684 </tr> 685 </table> 686 687 </div> 688 </body> 689 </html> 690