1 | <!DOCTYPE html> |
2 | <html> |
3 | <head> |
4 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
5 | <title>Clang - C++17, C++14, C++11 and C++98 Status</title> |
6 | <link type="text/css" rel="stylesheet" href="menu.css"> |
7 | <link type="text/css" rel="stylesheet" href="content.css"> |
8 | <style type="text/css"> |
9 | .none { background-color: #FFCCCC } |
10 | .partial { background-color: #FFE0B0 } |
11 | .svn { background-color: #FFFF99 } |
12 | .full { background-color: #CCFF99 } |
13 | .na { background-color: #DDDDDD } |
14 | :target { background-color: #FFFFBB; outline: #DDDD55 solid thin; } |
15 | th { background-color: #FFDDAA } |
16 | td { vertical-align: middle } |
17 | tt { white-space: nowrap } |
18 | </style> |
19 | </head> |
20 | <body> |
21 | |
22 | <!--#include virtual="menu.html.incl"--> |
23 | |
24 | <div id="content"> |
25 | |
26 | <!--*************************************************************************--> |
27 | <h1>C++ Support in Clang</h1> |
28 | <!--*************************************************************************--> |
29 | <p>Last updated: $Date$</p> |
30 | |
31 | <p>Clang fully implements all published ISO C++ standards (<a |
32 | href="#cxx98">C++98 / C++03</a>, <a |
33 | href="#cxx11">C++11</a>, and <a |
34 | href="#cxx14">C++14</a>), and most of the upcoming <a |
35 | href="#cxx17">C++17</a> standard. |
36 | |
37 | <p>The Clang community is continually striving to improve C++ standards |
38 | compliance between releases by submitting and tracking <a |
39 | href="cxx_dr_status.html">C++ Defect Reports</a> and implementing resolutions |
40 | as they become available.</p> |
41 | |
42 | <p>Experimental work is also under way to implement <a href="#ts">C++ Technical |
43 | Specifications</a> that will help drive the future of the C++ programming |
44 | language.</p> |
45 | |
46 | <p>The <a href="https://bugs.llvm.org/">LLVM bug tracker</a> contains Clang |
47 | C++ components that track known bugs with Clang's language conformance in |
48 | each 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/standard/50372.html">ISO |
60 | C++ 2011 standard</a>. |
61 | |
62 | <p>By default, Clang builds C++ code according to the C++98 standard, with many |
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++. |
66 | |
67 | <details> |
68 | <summary>List of features and minimum Clang version with support</summary> |
69 | |
70 | <table width="689" border="1" cellspacing="0"> |
71 | <tr> |
72 | <th>Language Feature</th> |
73 | <th>C++11 Proposal</th> |
74 | <th>Available in Clang?</th> |
75 | </tr> |
76 | <tr> |
77 | <td>Rvalue references</td> |
78 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html">N2118</a></td> |
79 | <td class="full" align="center">Clang 2.9</td> |
80 | </tr> |
81 | <tr> |
82 | <td> Rvalue references for <code>*this</code></td> |
83 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2439.htm">N2439</a></td> |
84 | <td class="full" align="center">Clang 2.9</td> |
85 | </tr> |
86 | <tr> |
87 | <td>Initialization of class objects by rvalues</td> |
88 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1610.html">N1610</a></td> |
89 | <td class="full" align="center">Clang 2.9</td> |
90 | </tr> |
91 | <tr> |
92 | <td>Non-static data member initializers</td> |
93 | <td><a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2008/n2756.htm">N2756</a></td> |
94 | <td class="full" align="center">Clang 3.0</td> |
95 | </tr> |
96 | <tr> |
97 | <td>Variadic templates</td> |
98 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf">N2242</a></td> |
99 | <td class="full" align="center">Clang 2.9</td> |
100 | </tr> |
101 | <tr> |
102 | <td> Extending variadic template template parameters</td> |
103 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf">N2555</a></td> |
104 | <td class="full" align="center">Clang 2.9</td> |
105 | </tr> |
106 | <tr> |
107 | <td rowspan="2">Initializer lists</td> |
108 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm">N2672</a></td> |
109 | <td class="full" align="center">Clang 3.1</td> |
110 | </tr> |
111 | <tr> <!-- from Kona 2019--> |
112 | <td><a href="http://wg21.link/p1009r2">P1009R2</a> (<a href="#dr">DR</a>)</td> |
113 | <td class="none" align="center">No</td> |
114 | </tr> |
115 | <tr> |
116 | <td>Static assertions</td> |
117 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html">N1720</a></td> |
118 | <td class="full" align="center">Clang 2.9</td> |
119 | </tr> |
120 | <tr> |
121 | <td><code>auto</code>-typed variables</td> |
122 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf">N1984</a></td> |
123 | <td class="full" align="center">Clang 2.9</td> |
124 | </tr> |
125 | <tr> |
126 | <td> Multi-declarator <code>auto</code></td> |
127 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1737.pdf">N1737</a></td> |
128 | <td class="full" align="center">Clang 2.9</td> |
129 | </tr> |
130 | <tr> |
131 | <td> Removal of auto as a storage-class specifier</td> |
132 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2546.htm">N2546</a></td> |
133 | <td class="full" align="center">Clang 2.9</td> |
134 | </tr> |
135 | <tr> |
136 | <td> New function declarator syntax</td> |
137 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm">N2541</a></td> |
138 | <td class="full" align="center">Clang 2.9</td> |
139 | </tr> |
140 | <tr> |
141 | <td rowspan="2">Lambda expressions</td> |
142 | <td><a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2927.pdf">N2927</a></td> |
143 | <td class="full" align="center">Clang 3.1</td> |
144 | </tr> |
145 | <tr> |
146 | <!-- from Albuquerque 2017 --> |
147 | <td><a href="http://wg21.link/p0588r1">P0588R1</a> (<a href="#dr">DR</a>)</td> |
148 | <td class="none" align="center">No</td> |
149 | </tr> |
150 | <tr> |
151 | <td>Declared type of an expression</td> |
152 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf">N2343</a></td> |
153 | <td class="full" align="center">Clang 2.9</td> |
154 | </tr> |
155 | <tr> |
156 | <td> Incomplete return types</td> |
157 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3276.pdf">N3276</a></td> |
158 | <td class="full" align="center">Clang 3.1</td> |
159 | </tr> |
160 | <tr> |
161 | <td>Right angle brackets</td> |
162 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html">N1757</a></td> |
163 | <td class="full" align="center">Clang 2.9</td> |
164 | </tr> |
165 | <tr> |
166 | <td>Default template arguments for function templates</td> |
167 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#226">DR226</a></td> |
168 | <td class="full" align="center">Clang 2.9</td> |
169 | </tr> |
170 | <tr> |
171 | <td>Solving the SFINAE problem for expressions</td> |
172 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2634.html">DR339</a></td> |
173 | <td class="full" align="center">Clang 2.9</td> |
174 | </tr> |
175 | <tr> |
176 | <td>Alias templates</td> |
177 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf">N2258</a></td> |
178 | <td class="full" align="center">Clang 3.0</td> |
179 | </tr> |
180 | <tr> |
181 | <td>Extern templates</td> |
182 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1987.htm">N1987</a></td> |
183 | <td class="full" align="center">Clang 2.9</td> |
184 | </tr> |
185 | <tr> |
186 | <td>Null pointer constant</td> |
187 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf">N2431</a></td> |
188 | <td class="full" align="center">Clang 3.0</td> |
189 | </tr> |
190 | <tr> |
191 | <td>Strongly-typed enums</td> |
192 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf">N2347</a></td> |
193 | <td class="full" align="center">Clang 2.9</td> |
194 | </tr> |
195 | <tr> |
196 | <td>Forward declarations for enums</td> |
197 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2764.pdf">N2764</a> |
198 | <br><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1206">DR1206</a></td> |
199 | <td class="full" align="center">Clang 3.1</td> |
200 | </tr> |
201 | <tr> |
202 | <td>Standardized attribute syntax</td> |
203 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf">N2761</a></td> |
204 | <td class="full" align="center">Clang 3.3 <a href="#n2761">(1)</a></td> |
205 | </tr> |
206 | <tr> |
207 | <td rowspan="2">Generalized constant expressions</td> |
208 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf">N2235</a></td> |
209 | <td class="full" align="center">Clang 3.1</td> |
210 | </tr> |
211 | <tr> |
212 | <!-- from Albuquerque 2017 --> |
213 | <td><a href="http://wg21.link/p0859r0">P0859R0</a> (<a href="#dr">DR</a>)</td> |
214 | <td class="svn" align="center">SVN</td> |
215 | </tr> |
216 | <tr> |
217 | <td>Alignment support</td> |
218 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf">N2341</a></td> |
219 | <td class="full" align="center">Clang 3.3</td> |
220 | </tr> |
221 | <tr> |
222 | <td>Conditionally-support behavior</td> |
223 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1627.pdf">N1627</a></td> |
224 | <td class="full" align="center">Clang 2.9</td> |
225 | </tr> |
226 | <tr> |
227 | <td>Changing undefined behavior into diagnosable errors</td> |
228 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1727.pdf">N1727</a></td> |
229 | <td class="full" align="center">Clang 2.9</td> |
230 | </tr> |
231 | <tr> |
232 | <td>Delegating constructors</td> |
233 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf">N1986</a></td> |
234 | <td class="full" align="center">Clang 3.0</td> |
235 | </tr> |
236 | <tr> |
237 | <td rowspan="2">Inheriting constructors</td> |
238 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm">N2540</a></td> |
239 | <td class="full" align="center">Clang 3.3</td> |
240 | </tr> |
241 | <tr> |
242 | <!-- from Kona 2015 --> |
243 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0136r1.html">P0136R1</a> (<a href="#dr">DR</a>)</td> |
244 | <td class="full" align="center">Clang 3.9</td> |
245 | </tr> |
246 | <tr> |
247 | <td>Explicit conversion operators</td> |
248 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf">N2437</a></td> |
249 | <td class="full" align="center">Clang 3.0</td> |
250 | </tr> |
251 | <tr> |
252 | <td>New character types</td> |
253 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2249.html">N2249</a></td> |
254 | <td class="full" align="center">Clang 2.9</td> |
255 | </tr> |
256 | <tr> |
257 | <td>Unicode string literals</td> |
258 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm">N2442</a></td> |
259 | <td class="full" align="center">Clang 3.0</td> |
260 | </tr> |
261 | <tr> |
262 | <td>Raw string literals</td> |
263 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm">N2442</a></td> |
264 | <td class="full" align="center">Clang 3.0</td> |
265 | </tr> |
266 | <tr> |
267 | <td>Universal character names in literals</td> |
268 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html">N2170</a></td> |
269 | <td class="full" align="center">Clang 3.1</td> |
270 | </tr> |
271 | <tr> |
272 | <td>User-defined literals</td> |
273 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf">N2765</a></td> |
274 | <td class="full" align="center">Clang 3.1</td> |
275 | </tr> |
276 | <tr> |
277 | <td>Standard Layout Types</td> |
278 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2342.htm">N2342</a></td> |
279 | <td class="full" align="center">Clang 3.0</td> |
280 | </tr> |
281 | <tr> |
282 | <td rowspan="2">Defaulted functions</td> |
283 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm">N2346</a></td> |
284 | <td class="full" align="center">Clang 3.0</td> |
285 | </tr> |
286 | <tr> <!-- from Kona 2019--> |
287 | <td><a href="http://wg21.link/p1286r2">P1286R2</a> (<a href="#dr">DR</a>)</td> |
288 | <td class="none" align="center">No</td> |
289 | </tr> |
290 | <tr> |
291 | <td>Deleted functions</td> |
292 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm">N2346</a></td> |
293 | <td class="full" align="center">Clang 2.9</td> |
294 | </tr> |
295 | <tr> |
296 | <td>Extended friend declarations</td> |
297 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1791.pdf">N1791</a></td> |
298 | <td class="full" align="center">Clang 2.9</td> |
299 | </tr> |
300 | <tr> |
301 | <td>Extending <code>sizeof</code></td> |
302 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html">N2253</a> |
303 | <br><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#850">DR850</a></td> |
304 | <td class="full" align="center">Clang 3.1</td> |
305 | </tr> |
306 | <tr> |
307 | <td>Inline namespaces</td> |
308 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2535.htm">N2535</a></td> |
309 | <td class="full" align="center">Clang 2.9</td> |
310 | </tr> |
311 | <tr> |
312 | <td>Unrestricted unions</td> |
313 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf">N2544</a></td> |
314 | <td class="full" align="center">Clang 3.1</td> |
315 | </tr> |
316 | <tr> |
317 | <td>Local and unnamed types as template arguments</td> |
318 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm">N2657</a></td> |
319 | <td class="full" align="center">Clang 2.9</td> |
320 | </tr> |
321 | <tr> |
322 | <td rowspan="2">Range-based for</td> |
323 | <td><a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2930.html">N2930</a></td> |
324 | <td class="full" align="center">Clang 3.0</td> |
325 | </tr> |
326 | <tr> |
327 | <!-- from Jacksonville 2018 --> |
328 | <td><a href="http://wg21.link/p0962r1">P0962R1</a> (<a href="#dr">DR</a>)</td> |
329 | <td class="svn" align="center">SVN</td> |
330 | </tr> |
331 | <tr> |
332 | <td>Explicit virtual overrides</td> |
333 | <td><a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm">N2928</a> |
334 | <br><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm">N3206</a> |
335 | <br><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm">N3272</a></td> |
336 | <td class="full" align="center">Clang 3.0</td> |
337 | </tr> |
338 | <tr> |
339 | <td>Minimal support for garbage collection and reachability-based leak detection</td> |
340 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2670.htm">N2670</a></td> |
341 | <td class="na" align="center">N/A <a href="#n2670">(2)</a></td> |
342 | </tr> |
343 | <tr> |
344 | <td>Allowing move constructors to throw [noexcept]</td> |
345 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3050.html">N3050</a></td> |
346 | <td class="full" align="center">Clang 3.0</td> |
347 | </tr> |
348 | <tr> |
349 | <td>Defining move special member functions</td> |
350 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3053.html">N3053</a></td> |
351 | <td class="full" align="center">Clang 3.0</td> |
352 | </tr> |
353 | |
354 | <tr class="separator"> |
355 | <th align="center" colspan="3">Concurrency</th> |
356 | </tr> |
357 | <tr> |
358 | <td>Sequence points</td> |
359 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html">N2239</a></td> |
360 | <td class="full" align="center">Clang 3.3</td> |
361 | </tr> |
362 | <tr> |
363 | <td>Atomic operations</td> |
364 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html">N2427</a></td> |
365 | <td class="full" align="center">Clang 3.1</td> |
366 | </tr> |
367 | <tr> |
368 | <td>Strong Compare and Exchange</td> |
369 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2748.html">N2748</a></td> |
370 | <td class="full" align="center">Clang 3.1 <a href="#n2748">(3)</a></td> |
371 | </tr> |
372 | <tr> |
373 | <td>Bidirectional Fences</td> |
374 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2752.htm">N2752</a></td> |
375 | <td class="full" align="center">Clang 3.1</td> |
376 | </tr> |
377 | |
378 | <tr> |
379 | <td>Memory model</td> |
380 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2429.htm">N2429</a></td> |
381 | <td class="full" align="center">Clang 3.2</td> |
382 | </tr> |
383 | <tr> |
384 | <td>Data-dependency ordering: atomics and memory model</td> |
385 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2664.htm">N2664</a></td> |
386 | <td class="full" align="center">Clang 3.2 <a href="#n2664">(4)</a></td> |
387 | </tr> |
388 | <tr> |
389 | <td>Propagating exceptions</td> |
390 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html">N2179</a></td> |
391 | <td class="full" align="center">Clang 2.9</td> |
392 | </tr> |
393 | <tr> |
394 | <td>Allow atomics use in signal handlers</td> |
395 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2547.htm">N2547</a></td> |
396 | <td class="full" align="center">Clang 3.1</td> |
397 | </tr> |
398 | <tr> |
399 | <td>Thread-local storage</td> |
400 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm">N2659</a></td> |
401 | <td class="full" align="center">Clang 3.3 <a href="#n2659">(5)</a></td> |
402 | </tr> |
403 | <tr> |
404 | <td>Dynamic initialization and destruction with concurrency</td> |
405 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm">N2660</a></td> |
406 | <td class="full" align="center">Clang 2.9</td> |
407 | </tr> |
408 | |
409 | <tr class="separator"> |
410 | <th align="center" colspan="3">C99 Features in C++11</th> |
411 | </tr> |
412 | <tr> |
413 | <td><code>__func__</code> predefined identifier</td> |
414 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2340.htm">N2340</a></td> |
415 | <td class="full" align="center">Clang 2.9</td> |
416 | </tr> |
417 | <tr> |
418 | <td>C99 preprocessor</td> |
419 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm">N1653</a></td> |
420 | <td class="full" align="center">Clang 2.9</td> |
421 | </tr> |
422 | <tr> |
423 | <td><code>long long</code></td> |
424 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1811.pdf">N1811</a></td> |
425 | <td class="full" align="center">Clang 2.9</td> |
426 | </tr> |
427 | <tr> |
428 | <td>Extended integral types</td> |
429 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1988.pdf">N1988</a></td> |
430 | <td class="na" align="center">N/A <a href="#n1988">(6)</a></td> |
431 | </tr> |
432 | </table> |
433 | |
434 | <p> |
435 | <span id="n2761">(1): The <code>[[carries_dependency]]</code> attribute |
436 | has no effect.</span><br> |
437 | <span id="n2670">(2): No compiler changes are required for an implementation |
438 | such as Clang that does not provide garbage collection.</span><br> |
439 | <span id="n2748">(3): All compare-exchange operations are emitted as |
440 | strong compare-exchanges.</span><br> |
441 | <span id="n2664">(4): <code>memory_order_consume</code> is lowered to |
442 | <code>memory_order_acquire</code>.</span><br> |
443 | <span id="n2659">(5): <code>thread_local</code> support |
444 | requires a C++ runtime library providing <code>__cxa_thread_atexit</code>, such |
445 | as <a href="http://libcxxabi.llvm.org">libc++abi</a> 3.6 or later, |
446 | or libsupc++ 4.8 or later.</span><br> |
447 | <span id="n1988">(6): No compiler changes are required for an implementation |
448 | such as Clang that does not provide any extended integer types. |
449 | <code>__int128</code> is not treated as an extended integer type, |
450 | because changing <code>intmax_t</code> would be an ABI-incompatible |
451 | change.</span> |
452 | </p> |
453 | </details> |
454 | |
455 | <h2 id="cxx14">C++14 implementation status</h2> |
456 | |
457 | <p>Clang 3.4 and later implement all of the <a |
458 | href="http://www.iso.org/standard/64029.html">ISO |
459 | C++ 2014 standard</a>. |
460 | |
461 | <p>You can use Clang in C++14 mode with the <code>-std=c++14</code> option |
462 | (use <code>-std=c++1y</code> in Clang 3.4 and earlier).</p> |
463 | |
464 | <details> |
465 | <summary>List of features and minimum Clang version with support</summary> |
466 | |
467 | <table width="689" border="1" cellspacing="0"> |
468 | <tr> |
469 | <th>Language Feature</th> |
470 | <th>C++14 Proposal</th> |
471 | <th>Available in Clang?</th> |
472 | </tr> |
473 | <tr> |
474 | <td>Tweak to certain C++ contextual conversions</td> |
475 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3323.pdf">N3323</a></td> |
476 | <td class="full" align="center">Clang 3.4</td> |
477 | </tr> |
478 | <tr> |
479 | <td>Binary literals</td> |
480 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3472.pdf">N3472</a></td> |
481 | <td class="full" align="center">Clang 2.9</td> |
482 | </tr> |
483 | <tr> |
484 | <td>decltype(auto)</td> |
485 | <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> |
486 | <td class="full" align="center">Clang 3.3</td> |
487 | </tr> |
488 | <tr> |
489 | <td>Return type deduction for normal functions</td> |
490 | <td class="full" align="center">Clang 3.4</td> |
491 | </tr> |
492 | <tr> |
493 | <td>Initialized lambda captures</td> |
494 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3648.html">N3648</a></td> |
495 | <td class="full" align="center">Clang 3.4</td> |
496 | </tr> |
497 | <tr> |
498 | <td>Generic lambdas</td> |
499 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3649.html">N3649</a></td> |
500 | <td class="full" align="center">Clang 3.4</td> |
501 | </tr> |
502 | <tr> |
503 | <td>Variable templates</td> |
504 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3651.pdf">N3651</a></td> |
505 | <td class="full" align="center">Clang 3.4</td> |
506 | </tr> |
507 | <tr> |
508 | <td>Relaxing requirements on constexpr functions</td> |
509 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3652.html">N3652</a></td> |
510 | <td class="full" align="center">Clang 3.4</td> |
511 | </tr> |
512 | <tr> |
513 | <td>Member initializers and aggregates</td> |
514 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html">N3653</a></td> |
515 | <td class="full" align="center">Clang 3.3</td> |
516 | </tr> |
517 | <tr> |
518 | <td>Clarifying memory allocation</td> |
519 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3664.html">N3664</a></td> |
520 | <td class="full" align="center">Clang 3.4</td> |
521 | </tr> |
522 | <tr> |
523 | <td><tt>[[deprecated]]</tt> attribute</td> |
524 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3760.html">N3760</a></td> |
525 | <td class="full" align="center">Clang 3.4</td> |
526 | </tr> |
527 | <tr> |
528 | <td>Single quotation mark as digit separator</td> |
529 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3781.pdf">N3781</a></td> |
530 | <td class="full" align="center">Clang 3.4</td> |
531 | </tr> |
532 | <tr> |
533 | <td>C++ Sized Deallocation</td> |
534 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3778.html">N3778</a></td> |
535 | <td class="full" align="center">Clang 3.4 <a href="#n3778">(7)</a></td> |
536 | </tr> |
537 | </table> |
538 | |
539 | <p> |
540 | <span id="n3778">(7): In Clang 3.7 and later, sized deallocation is only enabled |
541 | if the user passes the <code>-fsized-deallocation</code> flag. The user must |
542 | supply definitions of the sized deallocation functions, either by providing them |
543 | explicitly or by using a C++ standard library that does. <code>libstdc++</code> |
544 | added these functions in version 5.0, and <code>libc++</code> added them in |
545 | version 3.7. |
546 | </span> |
547 | </p> |
548 | </details> |
549 | |
550 | <h2 id="cxx17">C++17 implementation status</h2> |
551 | |
552 | <p>Clang 5 and later implement all the features of the |
553 | <a href="https://www.iso.org/standard/68564.html">ISO C++ 2017 standard</a>. |
554 | |
555 | <p>You can use Clang in C++17 mode with the <code>-std=c++17</code> option |
556 | (use <code>-std=c++1z</code> in Clang 4 and earlier).</p> |
557 | |
558 | <details open> |
559 | <summary>List of features and minimum Clang version with support</summary> |
560 | |
561 | <table width="689" border="1" cellspacing="0"> |
562 | <tr> |
563 | <th>Language Feature</th> |
564 | <th>C++17 Proposal</th> |
565 | <th>Available in Clang?</th> |
566 | </tr> |
567 | <!-- Issaquah 2014 papers --> |
568 | <tr> |
569 | <td><tt>static_assert</tt> with no message</td> |
570 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3928.pdf">N3928</a></td> |
571 | <td class="full" align="center">Clang 3.5</td> |
572 | </tr> |
573 | <!-- Rapperswil papers --> |
574 | <tr> |
575 | <td>Disabling trigraph expansion by default</td> |
576 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4086.html">N4086</a></td> |
577 | <td class="full" align="center">Clang 3.5</td> |
578 | </tr> |
579 | <!-- |
580 | <tr> |
581 | <td rowspan="2">Terse range-based for loops (removed from C++17)</td> |
582 | <td rowspan="2"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3994.htm">N3994</a></td> |
583 | <td class="none" align="center">Clang 3.5: Yes</td> |
584 | </tr> |
585 | <tr> |
586 | <td class="svn" align="center">SVN: No</td> |
587 | </tr> |
588 | --> |
589 | <tr> |
590 | <td><tt>typename</tt> in a template template parameter</td> |
591 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4051.html">N4051</a></td> |
592 | <td class="full" align="center">Clang 3.5</td> |
593 | </tr> |
594 | <tr> |
595 | <td>New <tt>auto</tt> rules for direct-list-initialization |
596 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3922.html">N3922</a></td> |
597 | <td class="full" align="center">Clang 3.8 <a href="#n3922">(8)</a></td> |
598 | </tr> |
599 | <!-- Urbana papers --> |
600 | <tr> |
601 | <td rowspan="2">Fold expressions</td> |
602 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4295.html">N4295</a></td> |
603 | <td class="full" align="center">Clang 3.6</td> |
604 | </tr> |
605 | <tr> <!-- from Jacksonville --> |
606 | <td><a href="http://wg21.link/p0036r0">P0036R0</a></td> |
607 | <td class="full" align="center">Clang 3.9</td> |
608 | </tr> |
609 | <tr> |
610 | <td><tt>u8</tt> character literals</td> |
611 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4267.html">N4267</a></td> |
612 | <td class="full" align="center">Clang 3.6</td> |
613 | </tr> |
614 | <tr> |
615 | <td>Nested namespace definition</td> |
616 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4230.html">N4230</a></td> |
617 | <td class="full" align="center">Clang 3.6</td> |
618 | </tr> |
619 | <tr> |
620 | <td>Attributes for namespaces and enumerators</td> |
621 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4266.html">N4266</a></td> |
622 | <td class="full" align="center">Clang 3.6</td> |
623 | </tr> |
624 | <tr> |
625 | <td>Allow constant evaluation for all non-type template arguments</td> |
626 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4268.html">N4268</a></td> |
627 | <td class="full" align="center">Clang 3.6</td> |
628 | </tr> |
629 | <!-- Kona papers --> |
630 | <tr> |
631 | <td>Remove deprecated <tt>register</tt> storage class</td> |
632 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0001r1.html">P0001R1</a></td> |
633 | <td class="full" align="center">Clang 3.8</td> |
634 | </tr> |
635 | <tr> |
636 | <td>Remove deprecated <tt>bool</tt> increment</td> |
637 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0002r1.html">P0002R1</a></td> |
638 | <td class="full" align="center">Clang 3.8</td> |
639 | </tr> |
640 | <tr> |
641 | <td>Make exception specifications part of the type system</td> |
642 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0012r1.html">P0012R1</a></td> |
643 | <td class="full" align="center">Clang 4</td> |
644 | </tr> |
645 | <tr> |
646 | <td><tt>__has_include</tt> in preprocessor conditionals</td> |
647 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0061.html">P0061R1</a></td> |
648 | <td class="full" align="center">Yes</td> |
649 | </tr> |
650 | <!-- Jacksonville papers --> |
651 | <tr> |
652 | <td><tt>[[fallthrough]]</tt> attribute</td> |
653 | <td><a href="http://wg21.link/p0188r1">P0188R1</a></td> |
654 | <td class="full" align="center">Clang 3.9</td> |
655 | </tr> |
656 | <tr> |
657 | <td><tt>[[nodiscard]]</tt> attribute</td> |
658 | <td><a href="http://wg21.link/p0189r1">P0189R1</a></td> |
659 | <td class="full" align="center">Clang 3.9</td> |
660 | </tr> |
661 | <tr> |
662 | <td><tt>[[maybe_unused]]</tt> attribute</td> |
663 | <td><a href="http://wg21.link/p0212r1">P0212R1</a></td> |
664 | <td class="full" align="center">Clang 3.9</td> |
665 | </tr> |
666 | <tr> |
667 | <td>Aggregate initialization of classes with base classes</td> |
668 | <td><a href="http://wg21.link/p0017r1">P0017R1</a></td> |
669 | <td class="full" align="center">Clang 3.9</td> |
670 | </tr> |
671 | <tr> |
672 | <td><tt>constexpr</tt> lambda expressions</td> |
673 | <td><a href="http://wg21.link/p0170r1">P0170R1</a></td> |
674 | <td class="full" align="center">Clang 5</td> |
675 | </tr> |
676 | <tr> |
677 | <td>Differing <tt>begin</tt> and <tt>end</tt> types in range-based <tt>for</tt></td> |
678 | <td><a href="http://wg21.link/p0184r0">P0184R0</a></td> |
679 | <td class="full" align="center">Clang 3.9</td> |
680 | </tr> |
681 | <tr> |
682 | <td>Lambda capture of <tt>*this</tt></td> |
683 | <td><a href="http://wg21.link/p0018r3">P0018R3</a></td> |
684 | <td class="full" align="center">Clang 3.9</td> |
685 | </tr> |
686 | <tr> |
687 | <td>Direct-list-initialization of <tt>enum</tt>s</td> |
688 | <td><a href="http://wg21.link/p0138r2">P0138R2</a></td> |
689 | <td class="full" align="center">Clang 3.9</td> |
690 | </tr> |
691 | <tr> |
692 | <td>Hexadecimal floating-point literals</td> |
693 | <td><a href="http://wg21.link/p0245r1">P0245R1</a></td> |
694 | <td class="full" align="center">Yes</td> |
695 | </tr> |
696 | <!-- Oulu papers --> |
697 | <tr> |
698 | <td>Using attribute namespaces without repetition</td> |
699 | <td><a href="http://wg21.link/p0028r4">P0028R4</a></td> |
700 | <td class="full" align="center">Clang 3.9</td> |
701 | </tr> |
702 | <tr> |
703 | <td>Dynamic memory allocation for over-aligned data</td> |
704 | <td><a href="http://wg21.link/p0035r4">P0035R4</a></td> |
705 | <td class="full" align="center">Clang 4</td> |
706 | </tr> |
707 | <tr> |
708 | <td rowspan="4">Template argument deduction for class templates</td> |
709 | <td><a href="http://wg21.link/p0091r3">P0091R3</a></td> |
710 | <td rowspan="2" class="full" align="center">Clang 5</td> |
711 | </tr> |
712 | <tr> <!-- from Issaquah --> |
713 | <td><a href="http://wg21.link/p0512r0">P0512R0</a></td> |
714 | </tr> |
715 | <tr> |
716 | <!-- from Kona 2017 --> |
717 | <td><a href="http://wg21.link/p0620r1">P0620R0</a> (<a href="#dr">DR</a>)</td> |
718 | <td class="full" align="center">Clang 7</td> |
719 | </tr> |
720 | <tr> |
721 | <!-- from Toronto 2017 --> |
722 | <td><a href="http://wg21.link/p0702r1">P0702R1</a> (<a href="#dr">DR</a>)</td> |
723 | <td class="full" align="center">Clang 6</td> |
724 | </tr> |
725 | <tr> |
726 | <td>Non-type template parameters with <tt>auto</tt> type</td> |
727 | <td><a href="http://wg21.link/p0127r2">P0127R2</a></td> |
728 | <td class="full" align="center">Clang 4</td> |
729 | </tr> |
730 | <tr> |
731 | <td>Guaranteed copy elision</td> |
732 | <td><a href="http://wg21.link/p0135r1">P0135R1</a></td> |
733 | <td class="full" align="center">Clang 4</td> |
734 | </tr> |
735 | <tr> |
736 | <td rowspan=2>Stricter expression evaluation order</td> |
737 | <td><a href="http://wg21.link/p0145r3">P0145R3</a></td> |
738 | <td class="full" align="center" rowspan=2>Clang 4 <a href="#p0145">(9)</a></td> |
739 | </tr> |
740 | <tr> |
741 | <td><a href="http://wg21.link/p0400r0">P0400R0</a></td> |
742 | </tr> |
743 | <tr> |
744 | <td>Requirement to ignore unknown attributes</td> |
745 | <td><a href="http://wg21.link/p0283r2">P0283R2</a></td> |
746 | <td class="full" align="center">Yes</td> |
747 | </tr> |
748 | <tr> |
749 | <td><tt>constexpr</tt> <em>if-statement</em>s</td> |
750 | <td><a href="http://wg21.link/p0292r2">P0292R2</a></td> |
751 | <td class="full" align="center">Clang 3.9</td> |
752 | </tr> |
753 | <tr> |
754 | <td>Inline variables</td> |
755 | <td><a href="http://wg21.link/p0386r2">P0386R2</a></td> |
756 | <td class="full" align="center">Clang 3.9</td> |
757 | </tr> |
758 | <tr> |
759 | <td rowspan="3">Structured bindings</td> |
760 | <td><a href="http://wg21.link/p0217r3">P0217R3</a></td> |
761 | <td class="full" align="center">Clang 4</td> |
762 | </tr> |
763 | <tr> |
764 | <!-- from Jacksonville 2018 --> |
765 | <td><a href="http://wg21.link/p0961r1">P0961R1</a> (<a href="#dr">DR</a>)</td> |
766 | <td class="svn" align="center">SVN</td> |
767 | </tr> |
768 | <tr> |
769 | <!-- from Jacksonville 2018 --> |
770 | <td><a href="http://wg21.link/p0969r0">P0969R0</a> (<a href="#dr">DR</a>)</td> |
771 | <td class="svn" align="center">SVN</td> |
772 | </tr> |
773 | <tr> |
774 | <td>Separate variable and condition for <tt>if</tt> and <tt>switch</tt></td> |
775 | <td><a href="http://wg21.link/p0305r1">P0305R1</a></td> |
776 | <td class="full" align="center">Clang 3.9</td> |
777 | </tr> |
778 | <!-- Issaquah 2016 papers --> |
779 | <tr> |
780 | <td>Matching template template parameters to compatible arguments</td> |
781 | <td><a href="http://wg21.link/p0522r0">P0522R0</a></td> |
782 | <td class="partial" align="center">Partial <a href="#p0522">(10)</a></td> |
783 | </tr> |
784 | <tr> |
785 | <td>Removing deprecated dynamic exception specifications</td> |
786 | <td><a href="http://wg21.link/p0003r5">P0003R5</a></td> |
787 | <td class="full" align="center">Clang 4</td> |
788 | </tr> |
789 | <tr> |
790 | <td>Pack expansions in <em>using-declarations</em></td> |
791 | <td><a href="http://wg21.link/p0195r2">P0195R2</a></td> |
792 | <td class="full" align="center">Clang 4</td> |
793 | </tr> |
794 | </table> |
795 | |
796 | <p> |
797 | <span id="n3922">(8): This is a backwards-incompatible change that is applied to |
798 | all language versions that allow type deduction from <tt>auto</tt> |
799 | (per the request of the C++ committee). |
800 | In Clang 3.7, a warning is emitted for all cases that would change meaning. |
801 | </span><br> |
802 | <span id="p0145">(9): Under the MS ABI, function parameters are destroyed from |
803 | left to right in the callee. As a result, function parameters in calls to |
804 | <tt>operator<<</tt>, <tt>operator>></tt>, <tt>operator->*</tt>, |
805 | <tt>operator&&</tt>, <tt>operator||</tt>, and <tt>operator,</tt> |
806 | functions using expression syntax are no longer guaranteed to be destroyed in |
807 | reverse construction order in that ABI. |
808 | </span><br> |
809 | <span id="p0522">(10): Despite being the resolution to a Defect Report, this |
810 | feature is disabled by default in all language versions, and can be enabled |
811 | explicitly with the flag <tt>-frelaxed-template-template-args</tt> in Clang 4 |
812 | onwards. |
813 | The change to the standard lacks a corresponding change for template partial |
814 | ordering, resulting in ambiguity errors for reasonable and previously-valid |
815 | code. This issue is expected to be rectified soon. |
816 | </span> |
817 | </p> |
818 | </details> |
819 | |
820 | <h2 id="cxx20">C++2a implementation status</h2> |
821 | |
822 | <p>Clang has <b>experimental</b> support for some proposed features of |
823 | the C++ standard following C++17, provisionally named C++2a. |
824 | Note that support for these features may change or be removed without notice, |
825 | as the draft C++2a standard evolves. |
826 | |
827 | <p>You can use Clang in C++2a mode with the <code>-std=c++2a</code> option.</p> |
828 | |
829 | <details open> |
830 | <summary>List of features and minimum Clang version with support</summary> |
831 | |
832 | <table width="689" border="1" cellspacing="0"> |
833 | <tr> |
834 | <th>Language Feature</th> |
835 | <th>C++2a Proposal</th> |
836 | <th>Available in Clang?</th> |
837 | </tr> |
838 | <!-- Toronto 2017 papers --> |
839 | <tr> |
840 | <td>Default member initializers for bit-fields</td> |
841 | <td><a href="http://wg21.link/p0683r1">P0683R1</a></td> |
842 | <td class="full" align="center">Clang 6</td> |
843 | </tr> |
844 | <tr> |
845 | <td><tt>const&</tt>-qualified pointers to members</td> |
846 | <td><a href="http://wg21.link/p0704r1">P0704R1</a></td> |
847 | <td class="full" align="center">Clang 6</td> |
848 | </tr> |
849 | <tr> |
850 | <td>Allow <i>lambda-capture</i> <tt>[=, this]</tt></td> |
851 | <td><a href="http://wg21.link/p0409r2">P0409R2</a></td> |
852 | <td class="full" align="center">Clang 6</td> |
853 | </tr> |
854 | <tr> |
855 | <td rowspan="2"><tt>__VA_OPT__</tt> for preprocessor comma elision</td> |
856 | <td><a href="http://wg21.link/p0306r4">P0306R4</a></td> |
857 | <td class="full" align="center">Clang 6</td> |
858 | </tr> |
859 | <tr> <!-- from Rapperswil --> |
860 | <td><a href="http://wg21.link/p1042r1">P1042R1</a></td> |
861 | <td class="partial" align="center">Partial</td> |
862 | </tr> |
863 | <tr> |
864 | <td>Designated initializers</td> |
865 | <td><a href="http://wg21.link/p0329r4">P0329R4</a></td> |
866 | <td class="partial" align="center">Partial (extension)</td> |
867 | </tr> |
868 | <tr> |
869 | <td><i>template-parameter-list</i> for generic lambdas</td> |
870 | <td><a href="http://wg21.link/p0428r2">P0428R2</a></td> |
871 | <td class="none" align="center">No</td> |
872 | </tr> |
873 | <tr id="p0734"> |
874 | <td rowspan="4">Concepts</td> |
875 | <td><a href="http://wg21.link/p0734r0">P0734R0</a></td> |
876 | <td rowspan="4" class="none" align="center">No</td> |
877 | </tr> |
878 | <tr> <!-- from Albuquerque --> |
879 | <td><a href="http://wg21.link/p0857r0">P0857R0</a></td> |
880 | </tr> |
881 | <tr> <!-- from San Diego --> |
882 | <td><a href="http://wg21.link/p1084r2">P1084R2</a></td> |
883 | </tr> |
884 | <tr> |
885 | <td><a href="http://wg21.link/p1141r2">P1414R2</a></td> |
886 | </tr> |
887 | <!-- Albuquerque papers --> |
888 | <tr> |
889 | <td>Range-based for statements with initializer</td> |
890 | <td><a href="http://wg21.link/p0614r1">P0614R1</a></td> |
891 | <td class="svn" align="center">SVN</td> |
892 | </tr> |
893 | <tr> |
894 | <td>ADL and function templates that are not visible</td> |
895 | <td><a href="http://wg21.link/p0846r0">P0846R0</a></td> |
896 | <td class="none" align="center">No</td> |
897 | </tr> |
898 | <tr> |
899 | <td><tt>const</tt> mismatch with defaulted copy constructor</td> |
900 | <td><a href="http://wg21.link/p0641r2">P0641R2</a></td> |
901 | <td class="svn" align="center">SVN</td> |
902 | </tr> |
903 | <tr> |
904 | <td rowspan="4">Consistent comparison (<tt>operator<=></tt>)</td> |
905 | <td><a href="http://wg21.link/p0515r3">P0515R3</a></td> |
906 | <td rowspan="3" class="partial" align="center">Partial</td> |
907 | </tr> |
908 | <tr> <!-- from Jacksonville --> |
909 | <td><a href="http://wg21.link/p0905r1">P0905R1</a></td> |
910 | </tr> |
911 | <tr> <!-- from Rapperswil --> |
912 | <td><a href="http://wg21.link/p1120r0">P1120R0</a></td> |
913 | </tr> |
914 | <tr> <!-- from Kona 2019 --> |
915 | <td><a href="http://wg21.link/p1185r2">P1185R2</a></td> |
916 | <td class="none" align="center">No</td> |
917 | </tr> |
918 | <tr> |
919 | <td>Access checking on specializations</td> |
920 | <td><a href="http://wg21.link/p0692r1">P0692R1</a></td> |
921 | <td class="partial" align="center">Partial</td> |
922 | </tr> |
923 | <tr> |
924 | <td>Default constructible and assignable stateless lambdas</td> |
925 | <td><a href="http://wg21.link/p0624r2">P0624R2</a></td> |
926 | <td class="svn" align="center">SVN</td> |
927 | </tr> |
928 | <tr> |
929 | <td>Lambdas in unevaluated contexts</td> |
930 | <td><a href="http://wg21.link/p0315r4">P0315R4</a></td> |
931 | <td class="none" align="center">No</td> |
932 | </tr> |
933 | <!-- Jacksonville papers --> |
934 | <tr> |
935 | <td><tt>[[no_unique_address]]</tt> attribute</td> |
936 | <td><a href="http://wg21.link/p0840r2">P0840R2</a></td> |
937 | <td class="none" align="center">No</td> |
938 | </tr> |
939 | <tr> |
940 | <td><tt>[[likely]]</tt> and <tt>[[unlikely]]</tt> attributes</td> |
941 | <td><a href="http://wg21.link/p0479r5">P0479R5</a></td> |
942 | <td class="none" align="center">No</td> |
943 | </tr> |
944 | <tr> |
945 | <td><tt>typename</tt> optional in more contexts</td> |
946 | <td><a href="http://wg21.link/p0634r3">P0634R3</a></td> |
947 | <td class="none" align="center">No</td> |
948 | </tr> |
949 | <tr> |
950 | <td>Pack expansion in lambda <i>init-capture</i></td> |
951 | <td><a href="http://wg21.link/p0780r2">P0780R2</a></td> |
952 | <td class="none" align="center">No</td> |
953 | </tr> |
954 | <!-- Rapperswil papers --> |
955 | <tr> |
956 | <td>Class types as non-type template parameters</td> |
957 | <td><a href="http://wg21.link/p0732r2">P0732R2</a></td> |
958 | <td class="none" align="center">No</td> |
959 | </tr> |
960 | <tr> |
961 | <td>Destroying operator delete</td> |
962 | <td><a href="http://wg21.link/p0722r3">P0722R3</a></td> |
963 | <td class="full" align="center">Clang 6</td> |
964 | </tr> |
965 | <tr> |
966 | <td rowspan=4>Relaxations of <tt>constexpr</tt> restrictions</td> |
967 | <td><a href="http://wg21.link/p1064r0">P1064R0</a></td> |
968 | <td class="none" align="center">No</td> |
969 | </tr> |
970 | <tr> <!-- from San Diego --> |
971 | <td><a href="http://wg21.link/p1002r1">P1002R1</a></td> |
972 | <td class="full" align="center">SVN</td> |
973 | </tr> |
974 | <tr> |
975 | <td><a href="http://wg21.link/p1327r1">P1327R1</a></td> |
976 | <td rowspan=2 class="none" align="center">No</td> |
977 | </tr> |
978 | <tr> |
979 | <td><a href="http://wg21.link/p1330r0">P1330R0</a></td> |
980 | </tr> |
981 | <tr> |
982 | <td>Prohibit aggregates with user-declared constructors</td> |
983 | <td><a href="http://wg21.link/p1008r1">P1008R1</a></td> |
984 | <td class="svn" align="center">SVN</td> |
985 | </tr> |
986 | <tr> |
987 | <td rowspan="3">Contracts</td> |
988 | <td><a href="http://wg21.link/p0542r5">P0542R5</a></td> |
989 | <td rowspan="3" class="none" align="center">No</td> |
990 | </tr> |
991 | <tr> <!-- from San Diego --> |
992 | <td><a href="http://wg21.link/p1289r1">P1289R1</a></td> |
993 | </tr> |
994 | <tr> <!-- from Kona 2019--> |
995 | <td><a href="http://wg21.link/p1323r2">P1323R2</a></td> |
996 | </tr> |
997 | <tr> |
998 | <td>Feature test macros</td> |
999 | <td><a href="http://wg21.link/p0941r2">P0941R2</a></td> |
1000 | <td class="full" align="center"><a href="#sd6">(see below)</a></td> |
1001 | </tr> |
1002 | <tr> |
1003 | <td><tt>explicit(bool)</tt></td> |
1004 | <td><a href="http://wg21.link/p0892r2">P0892R2</a></td> |
1005 | <td class="none" align="center">No</td> |
1006 | </tr> |
1007 | <!-- San Diego papers --> |
1008 | <tr> |
1009 | <td>Signed integers are two's complement</td> |
1010 | <td><a href="http://wg21.link/p1236r1">P1236R1</a></td> |
1011 | <td class="none" align="center">No</td> |
1012 | </tr> |
1013 | <tr> |
1014 | <td><tt>char8_t</tt></td> |
1015 | <td><a href="http://wg21.link/p0482r6">P0482R6</a></td> |
1016 | <td class="full" align="center">Clang 7 <a href="#p0482">(11)</a></td> |
1017 | </tr> |
1018 | <tr> |
1019 | <td>Immediate functions (<tt>consteval</tt>)</td> |
1020 | <td><a href="http://wg21.link/p1073r3">P1073R3</a></td> |
1021 | <td class="none" align="center">No</td> |
1022 | </tr> |
1023 | <tr> |
1024 | <td><tt>std::is_constant_evaluated</tt></td> |
1025 | <td><a href="http://wg21.link/p0595r2">P0595R2</a></td> |
1026 | <td class="none" align="center">No</td> |
1027 | </tr> |
1028 | <tr> |
1029 | <td>Nested inline namespaces</td> |
1030 | <td><a href="http://wg21.link/p1094r2">P1094R2</a></td> |
1031 | <td class="svn" align="center">SVN</td> |
1032 | </tr> |
1033 | <!-- Kona 2019 papers --> |
1034 | <tr> |
1035 | <td rowspan="2">Structured binding extensions</td> |
1036 | <td><a href="http://wg21.link/p1091r3">P1091R3</a></td> |
1037 | <td rowspan="2" class="none" align="center">No</td> |
1038 | </tr> |
1039 | <tr> |
1040 | <td><a href="http://wg21.link/p1381r1">P1381R1</a></td> |
1041 | </tr> |
1042 | <tr> |
1043 | <td rowspan="2">Stronger Unicode requirements</td> |
1044 | <td><a href="http://wg21.link/p1041r4">P1041R4</a></td> |
1045 | <td rowspan="2" class="full" align="center">Yes</td> |
1046 | </tr> |
1047 | <tr> |
1048 | <td><a href="http://wg21.link/p1139r2">P1139R2</a></td> |
1049 | </tr> |
1050 | <tr> |
1051 | <td>Parenthesized initialization of aggregates</td> |
1052 | <td><a href="http://wg21.link/p0960r3">P0960R3</a></td> |
1053 | <td class="none" align="center">No</td> |
1054 | </tr> |
1055 | <tr> |
1056 | <td>Modules</td> |
1057 | <td><a href="http://wg21.link/p1103r3">P1103R3</a></td> |
1058 | <td class="partial" align="center">Partial (<tt>-fmodules</tt>, <tt>-fmodules-ts</tt>)</td> |
1059 | </tr> |
1060 | <tr> |
1061 | <td>Coroutines</td> |
1062 | <td><a href="http://wg21.link/p0912r5">P0912R5</a></td> |
1063 | <td class="partial" align="center">Partial</td> |
1064 | </tr> |
1065 | </table> |
1066 | |
1067 | <p> |
1068 | <span id="p0482">(11): Prior to Clang 8, this feature is not enabled by |
1069 | <tt>-std=c++2a</tt>, but can be enabled with <tt>-fchar8_t</tt>. |
1070 | </span> |
1071 | </p> |
1072 | </details> |
1073 | |
1074 | <h2 id="dr">Defect reports</h2> |
1075 | |
1076 | <p>Clang generally aims to implement resolutions to Defect Reports (bug fixes |
1077 | against prior standards) retroactively, in all prior standard versions where |
1078 | the fix is meaningful. Significant Defect Report changes to language features |
1079 | after the publication of the relevant standard are marked (DR) in the above |
1080 | table.</p> |
1081 | |
1082 | <p>Clang also has a test suite for conformance to resolutions for issues on the |
1083 | <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_toc.html">C++ core issues list</a>, |
1084 | most of which are considered Defect Reports. |
1085 | <a href="cxx_dr_status.html">Implementation status for C++ core issues</a> based on |
1086 | that test suite is tracked on a separate page.</p> |
1087 | |
1088 | <h2 id="ts">Technical specifications and standing documents</h2> |
1089 | |
1090 | <p>ISO C++ also publishes a number of documents describing additional language |
1091 | and library features that are not part of standard C++.</p> |
1092 | |
1093 | <details open> |
1094 | <summary>List of features and minimum Clang version with support</summary> |
1095 | |
1096 | <table width="689" border="1" cellspacing="0"> |
1097 | <tr> |
1098 | <th>Document</th> |
1099 | <th>Latest draft</th> |
1100 | <th>Compiler flag</th> |
1101 | <th>Available in Clang?</th> |
1102 | </tr> |
1103 | <tr id="sd6"> |
1104 | <td rowspan="6">SD-6: SG10 feature test recommendations</td> |
1105 | <td rowspan="6"><a href="http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations">SD-6</a></td> |
1106 | <td rowspan="6">N/A</td> |
1107 | <td class="full" align="center"> |
1108 | Clang 3.4 (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3745">N3745</a>)</br> |
1109 | </td> |
1110 | </tr> |
1111 | <tr> |
1112 | <td class="full" align="center"> |
1113 | Clang 3.6 (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4200">N4200</a>)</a> |
1114 | </td> |
1115 | </tr> |
1116 | <tr> |
1117 | <td class="full" align="center"> |
1118 | Clang 4 (<a href="http://wg21.link/p0096r3">P0096R3</a>)</a> |
1119 | </td> |
1120 | </tr> |
1121 | <tr> |
1122 | <td class="full" align="center"> |
1123 | Clang 5 (<a href="http://wg21.link/p0096r4">P0096R4</a>)</a> |
1124 | </td> |
1125 | </tr> |
1126 | <tr> |
1127 | <td class="full" align="center"> |
1128 | Clang 7 (<a href="http://wg21.link/p0096r5">P0096R5</a>)</a> |
1129 | </td> |
1130 | </tr> |
1131 | <tr> |
1132 | <td class="partial" align="center"> |
1133 | WIP (<a href="http://wg21.link/p1353r0">P1353R0</a>) |
1134 | </td> |
1135 | </tr> |
1136 | <!-- FIXME: Implement latest recommendations. |
1137 | <tr> |
1138 | <td class="svn" align="center"> |
1139 | SVN (<a href="http://wg21.link/p0096r3">P0096R3</a>)</a> |
1140 | </td> |
1141 | </tr> |
1142 | --> |
1143 | <!-- No compiler support is known to be needed for: |
1144 | * Concurrency TS |
1145 | * Parallelism TS (v1, v2) |
1146 | * Ranges TS |
1147 | * Networking TS |
1148 | * File System TS |
1149 | --> |
1150 | <tr> |
1151 | <td>[TS] Concepts</td> |
1152 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0121r0.pdf">P0121R0</a></td> |
1153 | <td></td> |
1154 | <td class="na" align="center">Superseded by <a href="#p0734">P0734R0</a></td> |
1155 | </tr> |
1156 | <tr> |
1157 | <!-- track unimplemented Coroutines features: p0913r1 p0914r1 p1356r0 --> |
1158 | <td rowspan="2">[TS] Coroutines</td> |
1159 | <td rowspan="2"><a href="https://isocpp.org/files/papers/N4663.pdf">N4663</a></td> |
1160 | <td><tt>-fcoroutines-ts<br>-stdlib=libc++</tt></td> |
1161 | <td class="full" align="center">Clang 5</td> |
1162 | </tr> |
1163 | <tr> |
1164 | <td><tt>-std=c++2a<br>-stdlib=libc++</tt></td> |
1165 | <td class="na" align="center">Superseded by <a href="#p0912">P0912R5</a></td> |
1166 | </tr> |
1167 | <tr> |
1168 | <td>[TS] Library Fundamentals, Version 1 (invocation type traits)</td> |
1169 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4480.html">N4480</a></td> |
1170 | <td>N/A</td> |
1171 | <td class="none" align="center">No</td> |
1172 | </tr> |
1173 | <tr> |
1174 | <td>[TS] Library Fundamentals, Version 2 (<tt>source_location</tt>)</td> |
1175 | <td><a href="http://wg21.link/n4617">N4617</a></td> |
1176 | <td>N/A</td> |
1177 | <td class="none" align="center">No</td> |
1178 | </tr> |
1179 | <tr> |
1180 | <td>[TS] Modules</td> |
1181 | <td><a href="http://wg21.link/n4720">N4720</a></td> |
1182 | <td><tt>-fmodules-ts</tt></td> |
1183 | <td class="na" align="center">Superseded by <a href="#p1103">P1103R3</a></td> |
1184 | </tr> |
1185 | <tr> |
1186 | <td>[DRAFT TS] Reflection</td> |
1187 | <td><a href="http://wg21.link/n4746">N4746</a></td> |
1188 | <td></td> |
1189 | <td class="none" align="center">No</td> |
1190 | </tr> |
1191 | <tr> |
1192 | <td>[TS] Transactional Memory</td> |
1193 | <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4514.pdf">N4514</a></td> |
1194 | <td></td> |
1195 | <td class="none" align="center">No</td> |
1196 | </tr> |
1197 | </table> |
1198 | </details> |
1199 | |
1200 | </div> |
1201 | </body> |
1202 | </html> |
1203 | |