4 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
5 <title>Clang - C++1z, C++14, C++11 and C++98 Status</title>
6 <link type="text/css" rel="stylesheet" href="menu.css">
7 <link type="text/css" rel="stylesheet" href="content.css">
8 <style type="text/css">
9 .none { background-color: #FFCCCC }
10 .partial { background-color: #FFE0B0 }
11 .svn { background-color: #FFFF99 }
12 .full { background-color: #CCFF99 }
13 .na { background-color: #DDDDDD }
14 span:target { background-color: #FFFFBB; outline: #DDDD55 solid thin; }
15 th { background-color: #FFDDAA }
16 td { vertical-align: middle }
21 <!--#include virtual="menu.html.incl"-->
25 <!--*************************************************************************-->
26 <h1>C++ Support in Clang</h1>
27 <!--*************************************************************************-->
28 <p>Last updated: $Date: 2017-03-16 15:21:00 +0100 (Thu, 16 Mar 2017) $</p>
30 <p>Clang fully implements all published ISO C++ standards (<a
31 href="#cxx98">C++98 / C++03</a>, <a
32 href="#cxx11">C++11</a>, and <a
33 href="#cxx14">C++14</a>), and most of the upcoming <a
34 href="#cxx17">C++1z</a> standard.
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>
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
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>
49 <h2 id="cxx98">C++98 implementation status</h2>
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).
55 <h2 id="cxx11">C++11 implementation status</h2>
57 <p>Clang 3.3 and later implement all of the <a
58 href="http://www.iso.org/iso/catalogue_detail.htm?csnumber=50372">ISO
59 C++ 2011 standard</a>.
61 <p>By default, Clang builds C++ code according to the C++98 standard, with many
62 C++11 features accepted as extensions. You can use Clang in C++11 mode with the
63 <code>-std=c++11</code> option. Clang's C++11 mode can be used
64 with <a href="http://libcxx.llvm.org/">libc++</a> or with gcc's libstdc++.
67 <summary>List of features and minimum Clang version with support</summary>
69 <table width="689" border="1" cellspacing="0">
71 <th>Language Feature</th>
72 <th>C++11 Proposal</th>
73 <th>Available in Clang?</th>
76 <td>Rvalue references</td>
77 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html">N2118</a></td>
78 <td class="full" align="center">Clang 2.9</td>
81 <td> Rvalue references for <code>*this</code></td>
82 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2439.htm">N2439</a></td>
83 <td class="full" align="center">Clang 2.9</td>
86 <td>Initialization of class objects by rvalues</td>
87 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1610.html">N1610</a></td>
88 <td class="full" align="center">Clang 2.9</td>
91 <td>Non-static data member initializers</td>
92 <td><a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2008/n2756.htm">N2756</a></td>
93 <td class="full" align="center">Clang 3.0</td>
96 <td>Variadic templates</td>
97 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf">N2242</a></td>
98 <td class="full" align="center">Clang 2.9</td>
101 <td> Extending variadic template template parameters</td>
102 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf">N2555</a></td>
103 <td class="full" align="center">Clang 2.9</td>
106 <td>Initializer lists</td>
107 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm">N2672</a></td>
108 <td class="full" align="center">Clang 3.1</td>
111 <td>Static assertions</td>
112 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html">N1720</a></td>
113 <td class="full" align="center">Clang 2.9</td>
116 <td><code>auto</code>-typed variables</td>
117 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf">N1984</a></td>
118 <td class="full" align="center">Clang 2.9</td>
121 <td> Multi-declarator <code>auto</code></td>
122 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1737.pdf">N1737</a></td>
123 <td class="full" align="center">Clang 2.9</td>
126 <td> Removal of auto as a storage-class specifier</td>
127 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2546.htm">N2546</a></td>
128 <td class="full" align="center">Clang 2.9</td>
131 <td> New function declarator syntax</td>
132 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm">N2541</a></td>
133 <td class="full" align="center">Clang 2.9</td>
136 <td>Lambda expressions</td>
137 <td><a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2927.pdf">N2927</a></td>
138 <td class="full" align="center">Clang 3.1</td>
141 <td>Declared type of an expression</td>
142 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf">N2343</a></td>
143 <td class="full" align="center">Clang 2.9</td>
146 <td> Incomplete return types</td>
147 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3276.pdf">N3276</a></td>
148 <td class="full" align="center">Clang 3.1</td>
151 <td>Right angle brackets</td>
152 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html">N1757</a></td>
153 <td class="full" align="center">Clang 2.9</td>
156 <td>Default template arguments for function templates</td>
157 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#226">DR226</a></td>
158 <td class="full" align="center">Clang 2.9</td>
161 <td>Solving the SFINAE problem for expressions</td>
162 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2634.html">DR339</a></td>
163 <td class="full" align="center">Clang 2.9</td>
166 <td>Alias templates</td>
167 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf">N2258</a></td>
168 <td class="full" align="center">Clang 3.0</td>
171 <td>Extern templates</td>
172 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1987.htm">N1987</a></td>
173 <td class="full" align="center">Clang 2.9</td>
176 <td>Null pointer constant</td>
177 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf">N2431</a></td>
178 <td class="full" align="center">Clang 3.0</td>
181 <td>Strongly-typed enums</td>
182 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf">N2347</a></td>
183 <td class="full" align="center">Clang 2.9</td>
186 <td>Forward declarations for enums</td>
187 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2764.pdf">N2764</a>
188 <br><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1206">DR1206</a></td>
189 <td class="full" align="center">Clang 3.1</td>
192 <td>Standardized attribute syntax</td>
193 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf">N2761</a></td>
194 <td class="full" align="center">Clang 3.3 <a href="#n2761">(1)</a></td>
197 <td>Generalized constant expressions</td>
198 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf">N2235</a></td>
199 <td class="full" align="center">Clang 3.1</td>
202 <td>Alignment support</td>
203 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf">N2341</a></td>
204 <td class="full" align="center">Clang 3.3</td>
207 <td>Conditionally-support behavior</td>
208 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1627.pdf">N1627</a></td>
209 <td class="full" align="center">Clang 2.9</td>
212 <td>Changing undefined behavior into diagnosable errors</td>
213 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1727.pdf">N1727</a></td>
214 <td class="full" align="center">Clang 2.9</td>
217 <td>Delegating constructors</td>
218 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf">N1986</a></td>
219 <td class="full" align="center">Clang 3.0</td>
222 <td>Inheriting constructors</td>
223 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm">N2540</a></td>
224 <td class="full" align="center">Clang 3.3</td>
227 <td>Explicit conversion operators</td>
228 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf">N2437</a></td>
229 <td class="full" align="center">Clang 3.0</td>
232 <td>New character types</td>
233 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2249.html">N2249</a></td>
234 <td class="full" align="center">Clang 2.9</td>
237 <td>Unicode string literals</td>
238 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm">N2442</a></td>
239 <td class="full" align="center">Clang 3.0</td>
242 <td>Raw string literals</td>
243 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm">N2442</a></td>
244 <td class="full" align="center">Clang 3.0</td>
247 <td>Universal character names in literals</td>
248 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html">N2170</a></td>
249 <td class="full" align="center">Clang 3.1</td>
252 <td>User-defined literals</td>
253 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf">N2765</a></td>
254 <td class="full" align="center">Clang 3.1</td>
257 <td>Standard Layout Types</td>
258 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2342.htm">N2342</a></td>
259 <td class="full" align="center">Clang 3.0</td>
262 <td>Defaulted functions</td>
263 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm">N2346</a></td>
264 <td class="full" align="center">Clang 3.0</td>
267 <td>Deleted functions</td>
268 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm">N2346</a></td>
269 <td class="full" align="center">Clang 2.9</td>
272 <td>Extended friend declarations</td>
273 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1791.pdf">N1791</a></td>
274 <td class="full" align="center">Clang 2.9</td>
277 <td>Extending <code>sizeof</code></td>
278 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html">N2253</a>
279 <br><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#850">DR850</a></td>
280 <td class="full" align="center">Clang 3.1</td>
283 <td>Inline namespaces</td>
284 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2535.htm">N2535</a></td>
285 <td class="full" align="center">Clang 2.9</td>
288 <td>Unrestricted unions</td>
289 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf">N2544</a></td>
290 <td class="full" align="center">Clang 3.1</td>
293 <td>Local and unnamed types as template arguments</td>
294 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm">N2657</a></td>
295 <td class="full" align="center">Clang 2.9</td>
298 <td>Range-based for</td>
299 <td><a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2930.html">N2930</a></td>
300 <td class="full" align="center">Clang 3.0</td>
303 <td>Explicit virtual overrides</td>
304 <td><a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm">N2928</a>
305 <br><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm">N3206</a>
306 <br><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm">N3272</a></td>
307 <td class="full" align="center">Clang 3.0</td>
310 <td>Minimal support for garbage collection and reachability-based leak detection</td>
311 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2670.htm">N2670</a></td>
312 <td class="na" align="center">N/A <a href="#n2670">(2)</a></td>
315 <td>Allowing move constructors to throw [noexcept]</td>
316 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3050.html">N3050</a></td>
317 <td class="full" align="center">Clang 3.0</td>
320 <td>Defining move special member functions</td>
321 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3053.html">N3053</a></td>
322 <td class="full" align="center">Clang 3.0</td>
325 <tr class="separator">
326 <th align="center" colspan="3">Concurrency</th>
329 <td>Sequence points</td>
330 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html">N2239</a></td>
331 <td class="full" align="center">Clang 3.3</td>
334 <td>Atomic operations</td>
335 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html">N2427</a></td>
336 <td class="full" align="center">Clang 3.1</td>
339 <td>Strong Compare and Exchange</td>
340 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2748.html">N2748</a></td>
341 <td class="full" align="center">Clang 3.1 <a href="#n2748">(3)</a></td>
344 <td>Bidirectional Fences</td>
345 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2752.htm">N2752</a></td>
346 <td class="full" align="center">Clang 3.1</td>
350 <td>Memory model</td>
351 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2429.htm">N2429</a></td>
352 <td class="full" align="center">Clang 3.2</td>
355 <td>Data-dependency ordering: atomics and memory model</td>
356 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2664.htm">N2664</a></td>
357 <td class="full" align="center">Clang 3.2 <a href="#n2664">(4)</a></td>
360 <td>Propagating exceptions</td>
361 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html">N2179</a></td>
362 <td class="full" align="center">Clang 2.9</td>
365 <td>Allow atomics use in signal handlers</td>
366 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2547.htm">N2547</a></td>
367 <td class="full" align="center">Clang 3.1</td>
370 <td>Thread-local storage</td>
371 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm">N2659</a></td>
372 <td class="full" align="center">Clang 3.3 <a href="#n2659">(5)</a></td>
375 <td>Dynamic initialization and destruction with concurrency</td>
376 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm">N2660</a></td>
377 <td class="full" align="center">Clang 2.9</td>
380 <tr class="separator">
381 <th align="center" colspan="3">C99 Features in C++11</th>
384 <td><code>__func__</code> predefined identifier</td>
385 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2340.htm">N2340</a></td>
386 <td class="full" align="center">Clang 2.9</td>
389 <td>C99 preprocessor</td>
390 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm">N1653</a></td>
391 <td class="full" align="center">Clang 2.9</td>
394 <td><code>long long</code></td>
395 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1811.pdf">N1811</a></td>
396 <td class="full" align="center">Clang 2.9</td>
399 <td>Extended integral types</td>
400 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1988.pdf">N1988</a></td>
401 <td class="na" align="center">N/A <a href="#n1988">(6)</a></td>
406 <span id="n2761">(1): The <code>[[carries_dependency]]</code> attribute
407 has no effect.</span><br>
408 <span id="n2670">(2): No compiler changes are required for an implementation
409 such as Clang that does not provide garbage collection.</span><br>
410 <span id="n2748">(3): All compare-exchange operations are emitted as
411 strong compare-exchanges.</span><br>
412 <span id="n2664">(4): <code>memory_order_consume</code> is lowered to
413 <code>memory_order_acquire</code>.</span><br>
414 <span id="n2659">(5): <code>thread_local</code> support
415 requires a C++ runtime library providing <code>__cxa_thread_atexit</code>, such
416 as <a href="http://libcxxabi.llvm.org">libc++abi</a> 3.6 or later,
417 or libsupc++ 4.8 or later.</span><br>
418 <span id="n1988">(6): 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
426 <h2 id="cxx14">C++14 implementation status</h2>
428 <p>Clang 3.4 and later implement all of the <a
429 href="http://www.iso.org/iso/catalogue_detail.htm?csnumber=64029">ISO
430 C++ 2014 standard</a>.
432 <p>You can use Clang in C++14 mode with the <code>-std=c++14</code> option
433 (use <code>-std=c++1y</code> in Clang 3.4 and earlier).</p>
436 <summary>List of features and minimum Clang version with support</summary>
438 <table width="689" border="1" cellspacing="0">
440 <th>Language Feature</th>
441 <th>C++14 Proposal</th>
442 <th>Available in Clang?</th>
445 <td>Tweak to certain C++ contextual conversions</td>
446 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3323.pdf">N3323</a></td>
447 <td class="full" align="center">Clang 3.4</td>
450 <td>Binary literals</td>
451 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3472.pdf">N3472</a></td>
452 <td class="full" align="center">Clang 2.9</td>
455 <td>decltype(auto)</td>
456 <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>
457 <td class="full" align="center">Clang 3.3</td>
460 <td>Return type deduction for normal functions</td>
461 <td class="full" align="center">Clang 3.4</td>
464 <td>Initialized lambda captures</td>
465 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3648.html">N3648</a></td>
466 <td class="full" align="center">Clang 3.4</td>
469 <td>Generic lambdas</td>
470 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3649.html">N3649</a></td>
471 <td class="full" align="center">Clang 3.4</td>
474 <td>Variable templates</td>
475 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3651.pdf">N3651</a></td>
476 <td class="full" align="center">Clang 3.4</td>
479 <td>Relaxing requirements on constexpr functions</td>
480 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3652.html">N3652</a></td>
481 <td class="full" align="center">Clang 3.4</td>
484 <td>Member initializers and aggregates</td>
485 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html">N3653</a></td>
486 <td class="full" align="center">Clang 3.3</td>
489 <td>Clarifying memory allocation</td>
490 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3664.html">N3664</a></td>
491 <td class="full" align="center">Clang 3.4</td>
494 <td><tt>[[deprecated]]</tt> attribute</td>
495 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3760.html">N3760</a></td>
496 <td class="full" align="center">Clang 3.4</td>
499 <td>Single quotation mark as digit separator</td>
500 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3781.pdf">N3781</a></td>
501 <td class="full" align="center">Clang 3.4</td>
504 <td>C++ Sized Deallocation</td>
505 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3778.html">N3778</a></td>
506 <td class="full" align="center">Clang 3.4 <a href="#n3778">(7)</a></td>
511 <span id="n3778">(7): In Clang 3.7 and later, sized deallocation is only enabled
512 if the user passes the <code>-fsized-deallocation</code> flag. The user must
513 supply definitions of the sized deallocation functions, either by providing them
514 explicitly or by using a C++ standard library that does. <code>libstdc++</code>
515 added these functions in version 5.0, and <code>libc++</code> added them in
521 <h2 id="cxx17">C++1z implementation status</h2>
523 <p>Clang has <b>experimental</b> support for some proposed features of
524 the C++ standard following C++14, provisionally named C++1z.
525 Note that support for these features may change or be removed without notice,
526 as the draft C++1z standard evolves.
528 <p>You can use Clang in C++1z mode with the <code>-std=c++1z</code> option.</p>
531 <summary>List of features and minimum Clang version with support</summary>
533 <table width="689" border="1" cellspacing="0">
535 <th>Language Feature</th>
536 <th>C++1z Proposal</th>
537 <th>Available in Clang?</th>
539 <!-- Issaquah 2014 papers -->
541 <td><tt>static_assert</tt> with no message</td>
542 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3928.pdf">N3928</a></td>
543 <td class="full" align="center">Clang 3.5</td>
545 <!-- Rapperswil papers -->
547 <td>Disabling trigraph expansion by default</td>
548 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4086.html">N4086</a></td>
549 <td class="full" align="center">Clang 3.5</td>
553 <td rowspan="2">Terse range-based for loops (removed from C++1z)</td>
554 <td rowspan="2"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3994.htm">N3994</a></td>
555 <td class="none" align="center">Clang 3.5: Yes</td>
558 <td class="svn" align="center">SVN: No</td>
562 <td><tt>typename</tt> in a template template parameter</td>
563 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4051.html">N4051</a></td>
564 <td class="full" align="center">Clang 3.5</td>
567 <td>New <tt>auto</tt> rules for direct-list-initialization
568 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3922.html">N3922</a></td>
569 <td class="full" align="center">Clang 3.8 <a href="#n3922">(8)</a></td>
571 <!-- Urbana papers -->
573 <td rowspan="2">Fold expressions</td>
574 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4295.html">N4295</a></td>
575 <td class="full" align="center">Clang 3.6</td>
577 <tr> <!-- from Jacksonville -->
578 <td><a href="http://wg21.link/p0036r0">P0036R0</a></td>
579 <td class="full" align="center">Clang 3.9</td>
582 <td><tt>u8</tt> character literals</td>
583 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4267.html">N4267</a></td>
584 <td class="full" align="center">Clang 3.6</td>
587 <td>Nested namespace definition</td>
588 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4230.html">N4230</a></td>
589 <td class="full" align="center">Clang 3.6</td>
592 <td>Attributes for namespaces and enumerators</td>
593 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4266.html">N4266</a></td>
594 <td class="full" align="center">Clang 3.6</td>
597 <td>Allow constant evaluation for all non-type template arguments</td>
598 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4268.html">N4268</a></td>
599 <td class="full" align="center">Clang 3.6</td>
603 <td>Remove deprecated <tt>register</tt> storage class</td>
604 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0001r1.html">P0001R1</a></td>
605 <td class="full" align="center">Clang 3.8</td>
608 <td>Remove deprecated <tt>bool</tt> increment</td>
609 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0002r1.html">P0002R1</a></td>
610 <td class="full" align="center">Clang 3.8</td>
613 <td>Make exception specifications part of the type system</td>
614 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0012r1.html">P0012R1</a></td>
615 <td class="full" align="center">Clang 4</td>
618 <td><tt>__has_include</tt> in preprocessor conditionals</td>
619 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0061.html">P0061R1</a></td>
620 <td class="full" align="center">Yes</td>
623 <td>New specification for inheriting constructors (<a href="cxx_dr_status.html#1941">DR1941</a> et al)</td>
624 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0136r1.html">P0136R1</a></td>
625 <td class="full" align="center">Clang 3.9 <a href="#p0136">(9)</a></td>
627 <!-- Jacksonville papers -->
629 <td><tt>[[fallthrough]]</tt> attribute</td>
630 <td><a href="http://wg21.link/p0188r1">P0188R1</a></td>
631 <td class="full" align="center">Clang 3.9</td>
634 <td><tt>[[nodiscard]]</tt> attribute</td>
635 <td><a href="http://wg21.link/p0189r1">P0189R1</a></td>
636 <td class="full" align="center">Clang 3.9</td>
639 <td><tt>[[maybe_unused]]</tt> attribute</td>
640 <td><a href="http://wg21.link/p0212r1">P0212R1</a></td>
641 <td class="full" align="center">Clang 3.9</td>
644 <td>Aggregate initialization of classes with base classes</td>
645 <td><a href="http://wg21.link/p0017r1">P0017R1</a></td>
646 <td class="full" align="center">Clang 3.9</td>
649 <td><tt>constexpr</tt> lambda expressions</td>
650 <td><a href="http://wg21.link/p0170r1">P0170R1</a></td>
651 <td class="svn" align="center">SVN</td>
654 <td>Differing <tt>begin</tt> and <tt>end</tt> types in range-based <tt>for</tt></td>
655 <td><a href="http://wg21.link/p0184r0">P0184R0</a></td>
656 <td class="full" align="center">Clang 3.9</td>
659 <td>Lambda capture of <tt>*this</tt></td>
660 <td><a href="http://wg21.link/p0018r3">P0018R3</a></td>
661 <td class="full" align="center">Clang 3.9</td>
664 <td>Direct-list-initialization of <tt>enum</tt>s</td>
665 <td><a href="http://wg21.link/p0138r2">P0138R2</a></td>
666 <td class="full" align="center">Clang 3.9</td>
669 <td>Hexadecimal floating-point literals</td>
670 <td><a href="http://wg21.link/p0245r1">P0245R1</a></td>
671 <td class="full" align="center">Yes</td>
675 <td>Using attribute namespaces without repetition</td>
676 <td><a href="http://wg21.link/p0028r4">P0028R4</a></td>
677 <td class="full" align="center">Clang 3.9</td>
680 <td>Dynamic memory allocation for over-aligned data</td>
681 <td><a href="http://wg21.link/p0035r4">P0035R4</a></td>
682 <td class="full" align="center">Clang 4</td>
685 <td rowspan="2">Template argument deduction for class templates</td>
686 <td><a href="http://wg21.link/p0091r3">P0091R3</a></td>
687 <td rowspan="2" class="svn" align="center">SVN</td>
689 <tr> <!-- from Issaquah -->
690 <td><a href="http://wg21.link/p0512r0">P0512R0</a></td>
693 <td>Non-type template parameters with <tt>auto</tt> type</td>
694 <td><a href="http://wg21.link/p0127r2">P0127R2</a></td>
695 <td class="full" align="center">Clang 4</td>
698 <td>Guaranteed copy elision</td>
699 <td><a href="http://wg21.link/p0135r1">P0135R1</a></td>
700 <td class="full" align="center">Clang 4</td>
703 <td rowspan=2>Stricter expression evaluation order</td>
704 <td><a href="http://wg21.link/p0145r3">P0145R3</a></td>
705 <td class="full" align="center" rowspan=2>Clang 4 <a href="#p0145">(10)</a></td>
708 <td><a href="http://wg21.link/p0400r0">P0400R0</a></td>
711 <td>Requirement to ignore unknown attributes</td>
712 <td><a href="http://wg21.link/p0283r2">P0283R2</a></td>
713 <td class="full" align="center">Yes</td>
716 <td><tt>constexpr</tt> <em>if-statement</em>s</td>
717 <td><a href="http://wg21.link/p0292r2">P0292R2</a></td>
718 <td class="full" align="center">Clang 3.9</td>
721 <td>Inline variables</td>
722 <td><a href="http://wg21.link/p0386r2">P0386R2</a></td>
723 <td class="full" align="center">Clang 3.9</td>
726 <td>Structured bindings</td>
727 <td><a href="http://wg21.link/p0217r3">P0217R3</a></td>
728 <td class="full" align="center">Clang 4</td>
731 <td>Separate variable and condition for <tt>if</tt> and <tt>switch</tt></td>
732 <td><a href="http://wg21.link/p0305r1">P0305R1</a></td>
733 <td class="full" align="center">Clang 3.9</td>
735 <!-- Issaquah 2016 papers -->
737 <td>Matching template template parameters to compatible arguments</td>
738 <td><a href="http://wg21.link/p0522r0">P0522R0</a></td>
739 <td class="partial" align="center">Partial <a href="#p0522">(12)</a></td>
742 <td>Removing deprecated dynamic exception specifications</td>
743 <td><a href="http://wg21.link/p0003r5">P0003R5</a></td>
744 <td class="full" align="center">Clang 4</td>
747 <td>Pack expansions in <em>using-declarations</em></td>
748 <td><a href="http://wg21.link/p0195r2">P0195R2</a></td>
749 <td class="full" align="center">Clang 4</td>
754 <span id="n3922">(8): This is a backwards-incompatible change that is applied to
755 all language versions that allow type deduction from <tt>auto</tt>
756 (per the request of the C++ committee).
757 In Clang 3.7, a warning is emitted for all cases that would change meaning.
759 <span id="p0136">(9): This is the resolution to a Defect Report, so is applied
760 to all language versions supporting inheriting constructors.
762 <span id="p0145">(10): Under the MS ABI, function parameters are destroyed from
763 left to right in the callee. As a result, function parameters in calls to
764 <tt>operator<<</tt>, <tt>operator>></tt>, <tt>operator->*</tt>,
765 <tt>operator&&</tt>, <tt>operator||</tt>, and <tt>operator,</tt>
766 functions using expression syntax are no longer guaranteed to be destroyed in
767 reverse construction order in that ABI.
769 <span id="p0522">(12): Despite being the the resolution to a Defect Report, this
770 feature is disabled by default in all language versions, and can be enabled
771 explicitly with the flag <tt>-frelaxed-template-template-args</tt> in Clang 4.
772 The change to the standard lacks a corresponding change for template partial
773 ordering, resulting in ambiguity errors for reasonable and previously-valid
774 code. This issue is expected to be rectified soon.
779 <h2 id="ts">Technical specifications and standing documents</h2>
781 <p>ISO C++ also publishes a number of documents describing additional language
782 and library features that are not part of standard C++.</p>
785 <summary>List of features and minimum Clang version with support</summary>
787 <table width="689" border="1" cellspacing="0">
790 <th>Latest draft</th>
791 <th>Compiler flag</th>
792 <th>Available in Clang?</th>
795 <td rowspan="3">SD-6: SG10 feature test recommendations</td>
796 <td rowspan="3"><a href="http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations">SD-6</a></td>
797 <td rowspan="3">N/A</td>
798 <td class="full" align="center">
799 Clang 3.4 (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3745">N3745</a>)</br>
803 <td class="full" align="center">
804 Clang 3.6 (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4200">N4200</a>)</a>
808 <td class="full" align="center">
809 Clang 4 (<a href="http://wg21.link/p0096r3">P0096R3</a>)</a>
812 <!-- FIXME: Implement latest recommendations.
814 <td class="svn" align="center">
815 SVN (<a href="http://wg21.link/p0096r3">P0096R3</a>)</a>
819 <!-- No compiler support is known to be needed for:
827 <td>[TS] Concepts</td>
828 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0121r0.pdf">P0121R0</a></td>
830 <td class="none" align="center">WIP</td>
833 <td>[DRAFT TS] Coroutines</td>
834 <td><a href="http://wg21.link/p0057r7">P0057R7</a></td>
836 <td class="none" align="center">WIP</td>
839 <td>[TS] Library Fundamentals, Version 1 (invocation type traits)</td>
840 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4480.html">N4480</a></td>
842 <td class="none" align="center">No</td>
845 <td>[DRAFT TS] Library Fundamentals, Version 2 (<tt>source_location</tt>)</td>
846 <td><a href="http://wg21.link/n4600">N4600</a></td>
848 <td class="none" align="center">No</td>
851 <td>[DRAFT TS] Modules</td>
852 <td><a href="http://wg21.link/n4592">N4592</a></td>
853 <td><tt>-fmodules-ts</tt></td>
854 <td class="none" align="center">WIP</td>
857 <td>[TS] Transactional Memory</td>
858 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4514.pdf">N4514</a></td>
860 <td class="none" align="center">No</td>