<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:richard-llvm@metafoo.co.uk" title="Richard Smith <richard-llvm@metafoo.co.uk>"> <span class="fn">Richard Smith</span></a>
</span> changed
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - improve diagnostic for dependent using-declaration that was intended to inherit constructors but used invalid syntax"
href="https://bugs.llvm.org/show_bug.cgi?id=45026">bug 45026</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;">Summary</td>
<td>Incorrect "dependent using declaration resolved to type without 'typename'" error
</td>
<td>improve diagnostic for dependent using-declaration that was intended to inherit constructors but used invalid syntax
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>INVALID
</td>
<td>---
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>RESOLVED
</td>
<td>REOPENED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - improve diagnostic for dependent using-declaration that was intended to inherit constructors but used invalid syntax"
href="https://bugs.llvm.org/show_bug.cgi?id=45026#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - improve diagnostic for dependent using-declaration that was intended to inherit constructors but used invalid syntax"
href="https://bugs.llvm.org/show_bug.cgi?id=45026">bug 45026</a>
from <span class="vcard"><a class="email" href="mailto:richard-llvm@metafoo.co.uk" title="Richard Smith <richard-llvm@metafoo.co.uk>"> <span class="fn">Richard Smith</span></a>
</span></b>
<pre><span class="quote">> 1) If I should always do it in this form, why clang still accepts past syntax in a lot of cases and breaks only with such complicated case, seems to be very confusing.</span >
Per the above link, the language restriction only applies "when the
nested-name-specifier is dependent", which is to say when the part before the
final '::' involves a template parameter in some way.
Nonetheless it's good practice to always write the same name before and after
the '::', even though sometimes other syntaxes are sometimes valid.
<span class="quote">> 2) Error message is not clear at all.</span >
This is a fair point; it would be feasible to add a note to the diagnostic:
note: use the same name before and after the '::' to inherit constructors from
'ParentContainer<int>::NestedClass'
using parent_t::NestedClass;
^~~~~~~~~~~
parent_t
Reopening to track the possible diagnostic improvement.</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>