<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_RESOLVED bz_closed"
title="RESOLVED FIXED - member functions shadow template arguments resulting in "reference to non-static member function must be called" error"
href="https://bugs.llvm.org/show_bug.cgi?id=41309">bug 41309</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;">Fixed By Commit(s)</td>
<td>
</td>
<td>d1446017f3fdc2f6a9efba222008d20afa1e26cc
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - member functions shadow template arguments resulting in "reference to non-static member function must be called" error"
href="https://bugs.llvm.org/show_bug.cgi?id=41309#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - member functions shadow template arguments resulting in "reference to non-static member function must be called" error"
href="https://bugs.llvm.org/show_bug.cgi?id=41309">bug 41309</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">> Moreover, in CWG458, where the special handling of template members of class
> templates was added to [temp.local]p7, there is similar code:</span >
[...]
<span class="quote">> And CWG think that it should be ill-formed:</span >
CWG recently discussed this again, and decided that the rule in the standard is
correct as-is (reversing the decision from March 2004). Each template parameter
scope is associated with some enclosing lexical scope, and the template
parameters are searched after that enclosing lexical scope is searched. For
example, in:
template<typename> struct A {
template<typename> struct B {
template<typename> void f();
};
};
template<typename T> template<typename U> template<typename V> void
A<T>::B<U>::f() {
// #1
}
a lookup from #1 will consider V, then B<U> (and non-dependent base classes),
then U, then A<T> (and non-dependent base classes), then T, then the global
namespace scope.
The rules in this area will be clarified by the upcoming P1787.
I recently implemented that (longstanding but not previously implemented by any
compiler) rule in d1446017f3fdc2f6a9efba222008d20afa1e26cc.</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>