2008-07-02 19:38:59 +08:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
|
|
|
"http://www.w3.org/TR/html4/strict.dtd">
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
|
|
<title>Clang - Features and Goals</title>
|
|
|
|
<link type="text/css" rel="stylesheet" href="menu.css" />
|
|
|
|
<link type="text/css" rel="stylesheet" href="content.css" />
|
|
|
|
<style type="text/css">
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<!--#include virtual="menu.html.incl"-->
|
|
|
|
|
|
|
|
<div id="content">
|
|
|
|
|
|
|
|
<!--*************************************************************************-->
|
|
|
|
<h1>C++ Support in Clang</h1>
|
|
|
|
<!--*************************************************************************-->
|
|
|
|
|
|
|
|
<p>
|
|
|
|
This page tracks the status of C++ support in Clang.</p>
|
|
|
|
<table width="689" border="1">
|
|
|
|
<tr>
|
|
|
|
<td width="150"><h3>Feature</h3></td>
|
|
|
|
<td width="172"><h3>Example</h3></td>
|
|
|
|
<td width="345"><h3>Status</h3></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>C++ Keywords </td>
|
|
|
|
<td>reinterpret_cast</td>
|
|
|
|
<td>Full support.</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>C++ References</td>
|
|
|
|
<td>int &x = ...;</td>
|
2008-07-02 20:34:47 +08:00
|
|
|
<td>Parser and Sema support in, partial Codegen support.</td>
|
2008-07-02 19:38:59 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>C++ Default arguments </td>
|
|
|
|
<td>void f(int x=0); </td>
|
|
|
|
<td>Full support. </td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>C++ Namespaces</td>
|
|
|
|
<td>namespace A {<br/>
|
|
|
|
int x;<br/>
|
|
|
|
}</td>
|
2008-07-02 20:34:47 +08:00
|
|
|
<td>Parser and Sema support in, no Codegen support.</td>
|
2008-07-02 19:38:59 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>C++ Class definitions</td>
|
|
|
|
<td>class C {<br/>
|
|
|
|
public:<br/>
|
|
|
|
int getX() { return x; }<br/>
|
|
|
|
private:<br/>
|
|
|
|
int x;<br/>
|
|
|
|
};</td>
|
2008-07-02 20:34:47 +08:00
|
|
|
<td>Partial Parser and Sema support, no Codegen support.</td>
|
2008-07-02 19:38:59 +08:00
|
|
|
</tr>
|
2008-07-02 20:31:13 +08:00
|
|
|
<tr>
|
|
|
|
<td>Virtual functions</td>
|
|
|
|
<td>class C {<br/>
|
|
|
|
public:<br/>
|
|
|
|
virtual int doFoo() = 0;<br/>
|
|
|
|
};</td>
|
2008-07-02 20:34:47 +08:00
|
|
|
<td>Nonexistent.</td>
|
2008-07-02 20:31:13 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Templates</td>
|
|
|
|
<td>class C {<br/>
|
|
|
|
public:<br/>
|
2008-07-02 20:34:47 +08:00
|
|
|
template <typename T> T as();<br/>
|
2008-07-02 20:31:13 +08:00
|
|
|
};</td>
|
2008-07-02 20:34:47 +08:00
|
|
|
<td>Nonexistent.</td>
|
2008-07-02 20:31:13 +08:00
|
|
|
</tr>
|
2008-07-02 19:38:59 +08:00
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|