<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:jonathan.sauer@gmx.de" title="jonathan.sauer@gmx.de">jonathan.sauer@gmx.de</a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Forward Declaration of classes Within Namespaces causes error"
href="http://llvm.org/bugs/show_bug.cgi?id=17588">bug 17588</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>jonathan.sauer@gmx.de
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>INVALID
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Forward Declaration of classes Within Namespaces causes error"
href="http://llvm.org/bugs/show_bug.cgi?id=17588#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Forward Declaration of classes Within Namespaces causes error"
href="http://llvm.org/bugs/show_bug.cgi?id=17588">bug 17588</a>
from <span class="vcard"><a class="email" href="mailto:jonathan.sauer@gmx.de" title="jonathan.sauer@gmx.de">jonathan.sauer@gmx.de</a>
</span></b>
<pre>The forward declaration is invalid, as you cannot declare namespace elements
from outside the namespace. See C++ Standard §7.3.1.2p2 (emphasis mine):
| Members of a named namespace can also be defined outside that namespace by
| explicit qualification (3.4.3.2) of the name being defined, *provided that
the
| entity being defined was already declared in the namespace and the definition
| appears after the point of declaration in a namespace that encloses the
| declaration’s namespace*.
You have to say:
namespace MyNamespace {
class MyClass;
}
The fact that the code used to compile with clang means that this was a bug in
clang that was fixed in the meantime.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>