<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 DUPLICATE - Inheriting constructor resolving incorrectly."
href="https://llvm.org/bugs/show_bug.cgi?id=30400">bug 30400</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>richard-llvm@metafoo.co.uk
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>DUPLICATE
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED DUPLICATE - Inheriting constructor resolving incorrectly."
href="https://llvm.org/bugs/show_bug.cgi?id=30400#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED DUPLICATE - Inheriting constructor resolving incorrectly."
href="https://llvm.org/bugs/show_bug.cgi?id=30400">bug 30400</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>Note that Clang 3.9 implements
<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0136r1.html">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0136r1.html</a> and the
other cited compilers do not.
Under p0136r1, inheriting a constructor works much more like inheriting any
other member function. Note that this is rejected by all referenced compilers:
struct R {
void f() noexcept;
};
struct S : R {
using R::f;
template<class = void>
void f();
};
static_assert(!noexcept(S{}.f()), "");
So, this is working correctly per the standard + current DRs. Whether or not
that *should* work is a separate question, but it seems sensible to me that the
behavior be the same for constructors and other member functions. (We could
certainly imagine changing the rules for using-declarations so that a function
from a derived class is considered better than one from a base class, before
the template/non-template tiebreaker.)
Resolving as a duplicate of PR30305, as this is another "Implementing p0136r1
changes meaning of existing code" issue.
*** This bug has been marked as a duplicate of <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Inheriting constructors import special members -- Causes runtime slicing"
href="show_bug.cgi?id=30305">bug 30305</a> ***</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>