blob: 398d4517445516e5e712fcaef7c7888e016aa247 [file] [log] [blame]
Cedric Venet3d658642009-02-14 20:20:19 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
3<html>
4<head>
Gabor Greif70f2a042009-02-25 15:22:45 +00005 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
Richard Smith3139d662013-05-07 02:55:48 +00006 <title>Clang - C++98, C++11, and C++14 Status</title>
Gabor Greif70f2a042009-02-25 15:22:45 +00007 <link type="text/css" rel="stylesheet" href="menu.css">
8 <link type="text/css" rel="stylesheet" href="content.css">
Cedric Venet3d658642009-02-14 20:20:19 +00009 <style type="text/css">
Michael J. Spencer45b636a2011-11-02 06:29:37 +000010 .none { background-color: #FFCCCC }
Richard Smithfe596352013-05-04 07:02:10 +000011 .partial { background-color: #FFE0B0 }
Richard Smith65967ec2012-02-14 22:39:23 +000012 .svn { background-color: #FFFF99 }
Michael J. Spencer45b636a2011-11-02 06:29:37 +000013 .full { background-color: #CCFF99 }
Richard Smith15dcec72012-03-11 03:06:00 +000014 .na { background-color: #DDDDDD }
Richard Smith896e42d2013-03-12 19:56:09 +000015 span:target { background-color: #FFFFBB; outline: #DDDD55 solid thin; }
Benjamin Kramer8398bdb2011-11-05 10:11:36 +000016 th { background-color: #FFDDAA }
Cedric Venet3d658642009-02-14 20:20:19 +000017 </style>
18</head>
19<body>
20
21<!--#include virtual="menu.html.incl"-->
22
23<div id="content">
24
25<!--*************************************************************************-->
Richard Smithaff7d352013-04-19 17:27:48 +000026<h1>C++98, C++11, and C++14 Support in Clang</h1>
Cedric Venet3d658642009-02-14 20:20:19 +000027<!--*************************************************************************-->
Douglas Gregor4c9b68f2009-06-27 19:33:58 +000028<p>Last updated: $Date$</p>
Cedric Venet3d658642009-02-14 20:20:19 +000029
Richard Smith1e409d82012-02-24 18:42:08 +000030<h2 id="cxx98">C++98 implementation status</h2>
31
Douglas Gregor8c327082011-07-21 17:46:15 +000032<p>Clang currently implements all of the ISO C++ 1998 standard
33 (including the defects addressed in the ISO C++ 2003 standard)
Richard Smith3139d662013-05-07 02:55:48 +000034 except for <tt>export</tt> (which has been removed in C++11)
Douglas Gregor8c327082011-07-21 17:46:15 +000035 and is considered a production-quality C++ compiler. The <a
36 href="http://llvm.org/bugs/">LLVM bug tracker</a> contains a Clang
37 C++ component that tracks known Clang C++ bugs.</p>
Douglas Gregor57f1a002010-02-05 23:51:14 +000038
Richard Smith1e409d82012-02-24 18:42:08 +000039<h2 id="cxx11">C++11 implementation status</h2>
Chris Lattner900e32d2010-05-21 20:59:40 +000040
Richard Smithe6e68b52013-04-19 17:00:31 +000041 <p>Clang implements all of the <a
42 href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372">ISO
43 C++ 2011 standard</a>. The following table describes the Clang version
44 in which each feature became available.</p>
Chris Lattner900e32d2010-05-21 20:59:40 +000045
Richard Smith11fd5b12013-03-10 00:11:00 +000046<p>By default, Clang builds C++ code according to the C++98 standard, with many
47C++11 features accepted as extensions. You can use Clang in C++11 mode with the
48<code>-std=c++11</code> option. Clang's C++11 mode can be used
49with <a href="http://libcxx.llvm.org/">libc++</a> or with gcc's libstdc++, but
50patches are needed to make <a href="libstdc++4.4-clang0x.patch">libstdc++-4.4</a>
Richard Smithb5b37d12012-10-23 00:32:41 +000051work with Clang in C++11 mode. Patches are also needed to make
Richard Smithc3393932012-10-04 22:23:07 +000052<a href="libstdc++4.6-clang11.patch">libstdc++-4.6</a>,
Richard Smithb5b37d12012-10-23 00:32:41 +000053and <a href="libstdc++4.7-clang11.patch">libstdc++-4.7</a> work with Clang
Richard Smithe6e68b52013-04-19 17:00:31 +000054releases prior to version 3.2 in C++11 mode. <tt>thread_local</tt> support
55currently requires g++-4.8's C++ runtime library.</p>
Jeffrey Yasskin46ba01a2011-03-29 22:27:50 +000056
Cedric Venet3d658642009-02-14 20:20:19 +000057<table width="689" border="1" cellspacing="0">
Douglas Gregor43ac6d02011-10-14 23:21:49 +000058 <tr>
Benjamin Kramer8398bdb2011-11-05 10:11:36 +000059 <th>Language Feature</th>
Richard Smith1e409d82012-02-24 18:42:08 +000060 <th>C++11 Proposal</th>
Benjamin Kramer8398bdb2011-11-05 10:11:36 +000061 <th>Available in Clang?</th>
Douglas Gregor43ac6d02011-10-14 23:21:49 +000062 </tr>
63 <tr>
64 <td>Rvalue references</td>
65 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html">N2118</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +000066 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +000067 </tr>
68 <tr>
69 <td>&nbsp;&nbsp;&nbsp;&nbsp;Rvalue references for <code>*this</code></td>
70 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2439.htm">N2439</a></td>
Benjamin Kramer8398bdb2011-11-05 10:11:36 +000071 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +000072 </tr>
73 <tr>
74 <td>Initialization of class objects by rvalues</td>
75 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1610.html">N1610</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +000076 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +000077 </tr>
78 <tr>
79 <td>Non-static data member initializers</td>
80 <td><a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2008/n2756.htm">N2756</a></td>
Benjamin Kramer8398bdb2011-11-05 10:11:36 +000081 <td class="full" align="center">Clang 3.0</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +000082 </tr>
83 <tr>
84 <td>Variadic templates</td>
85 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf">N2242</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +000086 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +000087 </tr>
88 <tr>
89 <td>&nbsp;&nbsp;&nbsp;&nbsp;Extending variadic template template parameters</td>
90 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf">N2555</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +000091 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +000092 </tr>
93 <tr>
94 <td>Initializer lists</td>
95 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm">N2672</a></td>
Richard Smith24fd6c82012-05-23 01:38:11 +000096 <td class="full" align="center">Clang 3.1</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +000097 </tr>
98 <tr>
99 <td>Static assertions</td>
100 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html">N1720</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000101 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000102 </tr>
103 <tr>
104 <td><code>auto</code>-typed variables</td>
105 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf">N1984</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000106 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000107 </tr>
108 <tr>
109 <td>&nbsp;&nbsp;&nbsp;&nbsp;Multi-declarator <code>auto</code></td>
110 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1737.pdf">N1737</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000111 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000112 </tr>
113 <tr>
114 <td>&nbsp;&nbsp;&nbsp;&nbsp;Removal of auto as a storage-class specifier</td>
115 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2546.htm">N2546</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000116 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000117 </tr>
118 <tr>
119 <td>&nbsp;&nbsp;&nbsp;&nbsp;New function declarator syntax</td>
120 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm">N2541</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000121 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000122 </tr>
123 <tr>
Douglas Gregor7c07e962012-02-23 03:02:32 +0000124 <td>Lambda expressions</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000125 <td><a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2927.pdf">N2927</a></td>
Richard Smith24fd6c82012-05-23 01:38:11 +0000126 <td class="full" align="center">Clang 3.1</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000127 </tr>
128 <tr>
129 <td>Declared type of an expression</td>
130 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf">N2343</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000131 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000132 </tr>
133 <tr>
Douglas Gregor316551f2012-04-10 20:00:33 +0000134 <td>&nbsp;&nbsp;&nbsp;&nbsp;Incomplete return types</td>
135 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3276.pdf">N3276</a></td>
Richard Smith24fd6c82012-05-23 01:38:11 +0000136 <td class="full" align="center">Clang 3.1</td>
Douglas Gregor316551f2012-04-10 20:00:33 +0000137 </tr>
138 <tr>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000139 <td>Right angle brackets</td>
140 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html">N1757</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000141 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000142 </tr>
143 <tr>
144 <td>Default template arguments for function templates</td>
145 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#226">DR226</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000146 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000147 </tr>
148 <tr>
149 <td>Solving the SFINAE problem for expressions</td>
150 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2634.html">DR339</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000151 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000152 </tr>
153 <tr>
154 <td>Alias templates</td>
155 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf">N2258</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000156 <td class="full" align="center">Clang 3.0</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000157 </tr>
158 <tr>
159 <td>Extern templates</td>
160 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1987.htm">N1987</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000161 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000162 </tr>
163 <tr>
164 <td>Null pointer constant</td>
165 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf">N2431</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000166 <td class="full" align="center">Clang 3.0</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000167 </tr>
168 <tr>
169 <td>Strongly-typed enums</td>
170 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf">N2347</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000171 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000172 </tr>
173 <tr>
174 <td>Forward declarations for enums</td>
Richard Smithf1c66b42012-03-14 23:13:10 +0000175 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2764.pdf">N2764</a>
176 <br><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1206">DR1206</a></td>
Richard Smith24fd6c82012-05-23 01:38:11 +0000177 <td class="full" align="center">Clang 3.1</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000178 </tr>
179 <tr>
180 <td>Generalized attributes</td>
181 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf">N2761</a></td>
Richard Smith02344ac2013-06-17 23:54:23 +0000182 <td class="full" align="center">Clang 3.3 <a href="#n2761">(1)</a></td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000183 </tr>
184 <tr>
185 <td>Generalized constant expressions</td>
186 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf">N2235</a></td>
Richard Smith24fd6c82012-05-23 01:38:11 +0000187 <td class="full" align="center">Clang 3.1</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000188 </tr>
189 <tr>
190 <td>Alignment support</td>
191 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf">N2341</a></td>
Richard Smith02344ac2013-06-17 23:54:23 +0000192 <td class="full" align="center">Clang 3.3</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000193 </tr>
194 <!-- Skipped N1627: Conditionally-support behavior -->
195 <!-- Skipped N1727: Changing Undefined Behavior into Diagnosable Errors -->
196 <tr>
197 <td>Delegating constructors</td>
198 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf">N1986</a></td>
Benjamin Kramer8398bdb2011-11-05 10:11:36 +0000199 <td class="full" align="center">Clang 3.0</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000200 </tr>
201 <tr>
202 <td>Inheriting constructors</td>
203 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm">N2540</a></td>
Richard Smith02344ac2013-06-17 23:54:23 +0000204 <td class="full" align="center">Clang 3.3</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000205 </tr>
206 <tr>
207 <td>Explicit conversion operators</td>
208 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf">N2437</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000209 <td class="full" align="center">Clang 3.0</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000210 </tr>
211 <tr>
212 <td>New character types</td>
213 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2249.html">N2249</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000214 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000215 </tr>
216 <tr>
217 <td>Unicode string literals</td>
218 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm">N2442</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000219 <td class="full" align="center">Clang 3.0</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000220 </tr>
221 <tr>
222 <td>Raw string literals</td>
223 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm">N2442</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000224 <td class="full" align="center">Clang 3.0</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000225 </tr>
226 <tr>
Richard Smith26b75c02012-03-09 22:27:51 +0000227 <td>Universal character names in literals</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000228 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html">N2170</a></td>
Richard Smith24fd6c82012-05-23 01:38:11 +0000229 <td class="full" align="center">Clang 3.1</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000230 </tr>
231 <tr>
232 <td>User-defined literals</td>
233 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf">N2765</a></td>
Richard Smith24fd6c82012-05-23 01:38:11 +0000234 <td class="full" align="center">Clang 3.1</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000235 </tr>
236 <tr>
237 <td>Standard Layout Types</td>
238 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2342.htm">N2342</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000239 <td class="full" align="center">Clang 3.0</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000240 </tr>
241 <tr>
Douglas Gregor26bae202011-10-28 19:44:09 +0000242 <td>Defaulted functions</td>
243 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm">N2346</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000244 <td class="full" align="center">Clang 3.0</td>
Douglas Gregor26bae202011-10-28 19:44:09 +0000245 </tr>
246 <tr>
247 <td>Deleted functions</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000248 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm">N2346</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000249 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000250 </tr>
251 <tr>
252 <td>Extended friend declarations</td>
253 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1791.pdf">N1791</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000254 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000255 </tr>
256 <tr>
257 <td>Extending <code>sizeof</code></td>
Richard Smitha5ec58d2012-02-24 18:37:14 +0000258 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html">N2253</a>
259 <br><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#850">DR850</a></td>
Richard Smith24fd6c82012-05-23 01:38:11 +0000260 <td class="full" align="center">Clang 3.1</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000261 </tr>
262 <tr>
263 <td>Inline namespaces</td>
264 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2535.htm">N2535</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000265 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000266 </tr>
267 <tr>
268 <td>Unrestricted unions</td>
269 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf">N2544</a></td>
Richard Smith24fd6c82012-05-23 01:38:11 +0000270 <td class="full" align="center">Clang 3.1</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000271 </tr>
272 <tr>
273 <td>Local and unnamed types as template arguments</td>
274 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm">N2657</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000275 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000276 </tr>
277 <tr>
278 <td>Range-based for</td>
279 <td><a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2930.html">N2930</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000280 <td class="full" align="center">Clang 3.0</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000281 </tr>
282 <tr>
283 <td>Explicit virtual overrides</td>
284 <td><a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm">N2928</a>
Richard Smitha5ec58d2012-02-24 18:37:14 +0000285 <br><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm">N3206</a>
286 <br><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm">N3272</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000287 <td class="full" align="center">Clang 3.0</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000288 </tr>
289 <tr>
290 <td>Minimal support for garbage collection and reachability-based leak detection</td>
291 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2670.htm">N2670</a></td>
Richard Smith15dcec72012-03-11 03:06:00 +0000292 <td class="na" align="center">N/A</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000293 </tr>
294 <tr>
295 <td>Allowing move constructors to throw [noexcept]</td>
David Blaikieb09a33c2011-11-02 15:13:40 +0000296 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3050.html">N3050</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000297 <td class="full" align="center">Clang 3.0</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000298 </tr>
299 <tr>
300 <td>Defining move special member functions</td>
David Blaikieb09a33c2011-11-02 15:13:40 +0000301 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3053.html">N3053</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000302 <td class="full" align="center">Clang 3.0</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000303 </tr>
Cedric Venet3d658642009-02-14 20:20:19 +0000304
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000305 <tr class="separator">
Benjamin Kramer8398bdb2011-11-05 10:11:36 +0000306 <th align="center" colspan="3">Concurrency</th>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000307 </tr>
308 <tr>
309 <td>Sequence points</td>
310 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html">N2239</a></td>
Richard Smith02344ac2013-06-17 23:54:23 +0000311 <td class="full" align="center">Clang 3.3</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000312 </tr>
313 <tr>
314 <td>Atomic operations</td>
315 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html">N2427</a></td>
Richard Smith24fd6c82012-05-23 01:38:11 +0000316 <td class="full" align="center">Clang 3.1</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000317 </tr>
318 <tr>
319 <td>Strong Compare and Exchange</td>
320 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2748.html">N2748</a></td>
Richard Smith896e42d2013-03-12 19:56:09 +0000321 <td class="full" align="center">Clang 3.1 <a href="#n2748">(2)</a></td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000322 </tr>
323 <tr>
324 <td>Bidirectional Fences</td>
325 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2752.htm">N2752</a></td>
Richard Smith24fd6c82012-05-23 01:38:11 +0000326 <td class="full" align="center">Clang 3.1</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000327 </tr>
Douglas Gregor08765a92010-12-21 05:43:31 +0000328
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000329 <tr>
330 <td>Memory model</td>
331 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2429.htm">N2429</a></td>
Richard Smith52a92502013-01-29 04:55:18 +0000332 <td class="full" align="center">Clang 3.2</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000333 </tr>
334 <tr>
335 <td>Data-dependency ordering: atomics and memory model</td>
336 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2664.htm">N2664</a></td>
Richard Smith896e42d2013-03-12 19:56:09 +0000337 <td class="full" align="center">Clang 3.2 <a href="#n2664">(3)</a></td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000338 </tr>
339 <tr>
340 <td>Propagating exceptions</td>
341 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html">N2179</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000342 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000343 </tr>
344 <tr>
345 <td>Abandoning a process and at_quick_exit</td>
346 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2440.htm">N2440</a></td>
Richard Smith9d4e87e2012-04-13 01:02:19 +0000347 <td class="na" align="center">N/A</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000348 </tr>
349 <tr>
350 <td>Allow atomics use in signal handlers</td>
351 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2547.htm">N2547</a></td>
Richard Smith24fd6c82012-05-23 01:38:11 +0000352 <td class="full" align="center">Clang 3.1</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000353 </tr>
354 <tr>
355 <td>Thread-local storage</td>
356 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm">N2659</a></td>
Richard Smith02344ac2013-06-17 23:54:23 +0000357 <td class="full" align="center">Clang 3.3</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000358 </tr>
359 <tr>
360 <td>Dynamic initialization and destruction with concurrency</td>
361 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm">N2660</a></td>
Richard Smith14416322013-02-22 09:31:00 +0000362 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000363 </tr>
Cedric Venet3d658642009-02-14 20:20:19 +0000364
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000365 <tr class="separator">
Richard Smith1e409d82012-02-24 18:42:08 +0000366 <th align="center" colspan="3">C99 Features in C++11</th>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000367 </tr>
368 <tr>
369 <td><code>__func__</code> predefined identifier</td>
370 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2340.htm">N2340</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000371 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000372 </tr>
373 <tr>
374 <td>C99 preprocessor</td>
375 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm">N1653</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000376 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000377 </tr>
378 <tr>
379 <td><code>long long</code></td>
380 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1811.pdf">N1811</a></td>
Michael J. Spencer45b636a2011-11-02 06:29:37 +0000381 <td class="full" align="center">Clang 2.9</td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000382 </tr>
383 <tr>
384 <td>Extended integral types</td>
385 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1988.pdf">N1988</a></td>
Richard Smith71434a82013-03-18 21:44:56 +0000386 <td class="na" align="center">N/A <a href="#n1988">(4)</a></td>
Douglas Gregor43ac6d02011-10-14 23:21:49 +0000387 </tr>
Cedric Venet3d658642009-02-14 20:20:19 +0000388</table>
Richard Smith896e42d2013-03-12 19:56:09 +0000389
390<p>
391<span id="n2761">(1): The <code>[[carries_dependency]]</code> attribute
Richard Smithf72663f2013-03-18 21:57:52 +0000392has no effect.</span><br>
Richard Smith896e42d2013-03-12 19:56:09 +0000393<span id="n2748">(2): All compare-exchange operations are emitted as
Richard Smithf72663f2013-03-18 21:57:52 +0000394strong compare-exchanges.</span><br>
Richard Smith896e42d2013-03-12 19:56:09 +0000395<span id="n2664">(3): <code>memory_order_consume</code> is lowered to
Richard Smithf72663f2013-03-18 21:57:52 +0000396<code>memory_order_acquire</code>.</span><br>
Richard Smith71434a82013-03-18 21:44:56 +0000397<span id="n1988">(4): <code>__int128</code> is not treated as an extended
398integer type, because changing <code>intmax_t</code> would be an
399ABI-incompatible change.</span>
Richard Smith896e42d2013-03-12 19:56:09 +0000400</p>
401
Richard Smithaff7d352013-04-19 17:27:48 +0000402<h2 id="cxx14">C++1y implementation status</h2>
403
404<p>Clang is introducing support for the upcoming C++ language standard,
405provisionally named C++1y. The following table describes which C++1y features
406have been implemented in Clang and in which Clang version they became
407available.</p>
408
Richard Smith3139d662013-05-07 02:55:48 +0000409<p>You can use Clang in C++1y mode with the <code>-std=c++1y</code> option.</p>
Richard Smith7dc88642013-04-20 13:22:50 +0000410
Richard Smithaff7d352013-04-19 17:27:48 +0000411<table width="689" border="1" cellspacing="0">
412 <tr>
413 <th>Language Feature</th>
414 <th>C++1y Proposal</th>
415 <th>Available in Clang?</th>
416 </tr>
417 <tr>
418 <td>Tweak to certain C++ contextual conversions</td>
419 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3323.pdf">N3323</a></td>
Larisse Voufo375a0402013-06-17 05:37:15 +0000420 <td class="svn" align="center">SVN</td>
Richard Smithaff7d352013-04-19 17:27:48 +0000421 </tr>
422 <tr>
Richard Smith408de432013-04-20 12:44:32 +0000423 <td>Binary literals</td>
Richard Smithaff7d352013-04-19 17:27:48 +0000424 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3472.pdf">N3472</a></td>
Richard Smith2fcf0de2013-04-19 20:47:20 +0000425 <td class="full" align="center">Yes</td>
Richard Smithaff7d352013-04-19 17:27:48 +0000426 </tr>
427 <tr>
Richard Smitha2c36462013-04-26 16:15:35 +0000428 <td>decltype(auto)</td>
Richard Smith6f616292013-05-09 18:53:17 +0000429 <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>
Richard Smith02344ac2013-06-17 23:54:23 +0000430 <td class="full" align="center">Clang 3.3</td>
Richard Smitha2c36462013-04-26 16:15:35 +0000431 </tr>
432 <tr>
Richard Smith96ba7c72013-04-20 12:47:36 +0000433 <td>Return type deduction for normal functions</td>
Richard Smithf45c2992013-05-12 03:09:35 +0000434 <td class="svn" align="center">SVN</td>
Richard Smith96ba7c72013-04-20 12:47:36 +0000435 </tr>
Richard Smith408de432013-04-20 12:44:32 +0000436 <tr>
Richard Smith96ba7c72013-04-20 12:47:36 +0000437 <td>Initialized lambda captures</td>
Richard Smith6f616292013-05-09 18:53:17 +0000438 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3648.html">N3648</a></td>
Richard Smith44868f52013-09-28 04:37:56 +0000439 <td class="svn" align="center">SVN</td>
Richard Smithaff7d352013-04-19 17:27:48 +0000440 </tr>
441 <tr>
Richard Smithbb2d3782013-04-20 12:58:57 +0000442 <td>Generic lambdas</td>
Richard Smith6f616292013-05-09 18:53:17 +0000443 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3649.html">N3649</a></td>
Richard Smithf9d2ccd2013-09-27 19:11:33 +0000444 <td class="partial" align="center">Partial</td>
Richard Smithaff7d352013-04-19 17:27:48 +0000445 </tr>
446 <tr>
Richard Smithbb2d3782013-04-20 12:58:57 +0000447 <td>Variable templates</td>
Richard Smith6f616292013-05-09 18:53:17 +0000448 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3651.pdf">N3651</a></td>
Richard Smith629bc522013-09-27 20:19:41 +0000449 <td class="svn" align="center">SVN</td>
Richard Smithaff7d352013-04-19 17:27:48 +0000450 </tr>
451 <tr>
Richard Smith05a73f62013-04-20 12:49:36 +0000452 <td>Relaxing requirements on constexpr functions</td>
Richard Smith6f616292013-05-09 18:53:17 +0000453 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3652.html">N3652</a></td>
Richard Smith03ce5f82013-07-24 07:11:57 +0000454 <td class="svn" align="center">SVN</td>
Richard Smithaff7d352013-04-19 17:27:48 +0000455 </tr>
456 <tr>
Richard Smith96ba7c72013-04-20 12:47:36 +0000457 <td>Member initializers and aggregates</td>
Richard Smith6f616292013-05-09 18:53:17 +0000458 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html">N3653</a></td>
Richard Smith02344ac2013-06-17 23:54:23 +0000459 <td class="full" align="center">Clang 3.3</td>
Richard Smithaff7d352013-04-19 17:27:48 +0000460 </tr>
Richard Smithaff7d352013-04-19 17:27:48 +0000461 <tr>
Richard Smith8e95e302013-04-20 12:57:49 +0000462 <td>Clarifying memory allocation</td>
Richard Smith6f616292013-05-09 18:53:17 +0000463 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3664.html">N3664</a></td>
Richard Smithddcff1b2013-07-21 23:12:18 +0000464 <td class="svn" align="center">SVN</td>
Richard Smithaff7d352013-04-19 17:27:48 +0000465 </tr>
Richard Smithf9d2ccd2013-09-27 19:11:33 +0000466 <tr>
467 <td><tt>[[deprecated]]</tt> attribute</td>
468 <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3760.html">N3760</a></td>
Chandler Carruth8853c352013-09-27 22:30:27 +0000469 <td class="svn" align="center">SVN</td>
Richard Smithf9d2ccd2013-09-27 19:11:33 +0000470 </tr>
471 <tr>
472 <td>Single quotation mark as digit separator</td>
Richard Smith2096fd62013-09-27 19:55:03 +0000473 <td><!--<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3781.pdf">-->N3781<!--</a>--></td>
Richard Smithf9d2ccd2013-09-27 19:11:33 +0000474 <td class="svn" align="center">SVN</td>
475 </tr>
476 <tr>
Benjamin Kramereb263e82013-09-27 19:35:09 +0000477 <td>C++ Sized Deallocation</td>
Richard Smith2096fd62013-09-27 19:55:03 +0000478 <td><!--<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3778.html">-->N3778<!--</a>--></td>
Richard Smith4cb295d2013-09-29 04:40:38 +0000479 <td class="partial" align="center">Partial <a href="#n3778">(1)</a></td>
Richard Smithf9d2ccd2013-09-27 19:11:33 +0000480 </tr>
Richard Smithaff7d352013-04-19 17:27:48 +0000481</table>
482
Richard Smith4cb295d2013-09-29 04:40:38 +0000483<p>
484<span id="n3778">(1): Use the experimental <tt>-Xclang -fsized-deallocation</tt>
485flag to enable this feature.</span><br>
486</p>
487
Cedric Venet3d658642009-02-14 20:20:19 +0000488</div>
489</body>
490</html>