|
27 | 27 | <h1>C++ Support in Clang</h1>
|
28 | 28 | <!--*************************************************************************-->
|
29 | 29 |
|
30 |
| -<p>Clang fully implements all published ISO C++ standards |
31 |
| -(<a href="#cxx98">C++98 / C++03</a>, |
32 |
| -<a href="#cxx11">C++11</a>, |
33 |
| -<a href="#cxx14">C++14</a>, and |
34 |
| -<a href="#cxx17">C++17</a>), and some of the upcoming <a |
35 |
| -href="#cxx20">C++20</a> standard. |
| 30 | +<p>Clang implements the following published and upcoming ISO C++ standards:</p> |
| 31 | + |
| 32 | +<table width="689" border="1" cellspacing="0"> |
| 33 | +<tr> |
| 34 | + <th>Language Standard</th> |
| 35 | + <th>Flag</th> |
| 36 | + <th>Available in Clang?</th> |
| 37 | +</tr> |
| 38 | +<tr> |
| 39 | + <td><a href="#cxx98">C++98 / C++03</a></td> |
| 40 | + <td><tt>-std=c++98</tt></td> |
| 41 | + <td class="full" align="center">Yes (other than <tt>export</tt>)</td> |
| 42 | +</tr> |
| 43 | +<tr> |
| 44 | + <td><a href="#cxx11">C++11</a></td> |
| 45 | + <td><tt>-std=c++11</tt></td> |
| 46 | + <td class="full" align="center">Clang 3.3</td> |
| 47 | +</tr> |
| 48 | +<tr> |
| 49 | + <td><a href="#cxx14">C++14</a></td> |
| 50 | + <td><tt>-std=c++14</tt></td> |
| 51 | + <td class="full" align="center">Clang 3.4</td> |
| 52 | +</tr> |
| 53 | +<tr> |
| 54 | + <td><a href="#cxx17">C++17</a></td> |
| 55 | + <td><tt>-std=c++17</tt></td> |
| 56 | + <td class="full" align="center">Clang 5</td> |
| 57 | +</tr> |
| 58 | +<tr> |
| 59 | + <td><a href="#cxx20">C++20</a></td> |
| 60 | + <td><tt>-std=c++20</tt></td> |
| 61 | + <td class="partial" align="center">Partial</td> |
| 62 | +</tr> |
| 63 | +<tr> |
| 64 | + <td><a href="#cxx23">C++2b (tentatively C++23)</a></td> |
| 65 | + <td><tt>-std=c++2b</tt></td> |
| 66 | + <td class="none" align="center">No</td> |
| 67 | +</tr> |
| 68 | +</table> |
36 | 69 |
|
37 | 70 | <p>The Clang community is continually striving to improve C++ standards
|
38 | 71 | compliance between releases by submitting and tracking <a
|
@@ -823,7 +856,7 @@ <h2 id="cxx17">C++17 implementation status</h2>
|
823 | 856 | <h2 id="cxx20">C++20 implementation status</h2>
|
824 | 857 |
|
825 | 858 | <p>Clang has support for some of the features of the
|
826 |
| -ISO C++ 2020 Draft International Standard. |
| 859 | +<a href="https://www.iso.org/standard/79358.html">ISO C++ 2020 standard</a>. |
827 | 860 |
|
828 | 861 | <p>You can use Clang in C++20 mode with the <code>-std=c++20</code> option
|
829 | 862 | (use <code>-std=c++2a</code> in Clang 9 and earlier).</p>
|
@@ -1217,6 +1250,37 @@ <h2 id="cxx20">C++20 implementation status</h2>
|
1217 | 1250 | </p>
|
1218 | 1251 | </details>
|
1219 | 1252 |
|
| 1253 | +<h2 id="cxx23">C++2b implementation status</h2> |
| 1254 | + |
| 1255 | +<p>Clang has support for some of the features of the C++ standard following |
| 1256 | +C++20, informally referred to as C++2b. |
| 1257 | + |
| 1258 | +<p>You can use Clang in C++2b mode with the <code>-std=c++2b</code> option.</p> |
| 1259 | + |
| 1260 | +<details open> |
| 1261 | +<summary>List of features and minimum Clang version with support</summary> |
| 1262 | + |
| 1263 | +<table width="689" border="1" cellspacing="0"> |
| 1264 | + <tr> |
| 1265 | + <th>Language Feature</th> |
| 1266 | + <th>C++2b Proposal</th> |
| 1267 | + <th>Available in Clang?</th> |
| 1268 | + </tr> |
| 1269 | + <!-- Fall 2020 papers --> |
| 1270 | + <tr> |
| 1271 | + <td>Literal suffix <tt>uz</tt>, <tt>z</tt> for <tt>size_t</tt>, <tt>ssize_t</tt></td> |
| 1272 | + <td><a href="https://wg21.link/p0330r8">P0330R8</a></td> |
| 1273 | + <td class="none" align="center">No</td> |
| 1274 | + </tr> |
| 1275 | + <!-- Spring 2021 papers --> |
| 1276 | + <tr> |
| 1277 | + <td>Make <tt>()</tt> in lambdas optional in all cases</td> |
| 1278 | + <td><a href="https://wg21.link/p1102r2">P1102R2</a></td> |
| 1279 | + <td class="none" align="center">No</td> |
| 1280 | + </tr> |
| 1281 | +</table> |
| 1282 | +</details> |
| 1283 | + |
1220 | 1284 | <h2 id="dr">Defect reports</h2>
|
1221 | 1285 |
|
1222 | 1286 | <p>Clang generally aims to implement resolutions to Defect Reports (bug fixes
|
|
0 commit comments