<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 - variadic template function passed an initializer list fails with argument count mismatch error rather than expected "couldn't deduce template parameter" error"
href="https://bugs.llvm.org/show_bug.cgi?id=43944">bug 43944</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;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - variadic template function passed an initializer list fails with argument count mismatch error rather than expected "couldn't deduce template parameter" error"
href="https://bugs.llvm.org/show_bug.cgi?id=43944#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - variadic template function passed an initializer list fails with argument count mismatch error rather than expected "couldn't deduce template parameter" error"
href="https://bugs.llvm.org/show_bug.cgi?id=43944">bug 43944</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>Fixed in llvmorg-10-init-16681-g907cefe7214. (This is slightly speculative;
I've mailed the C++ committee core working group to discuss this, but I think
deducing T as a pack of one unknown element here rather than as an empty pack
is obviously the right thing to do.)
We now accept the testcase from <a href="show_bug.cgi?id=43944#c0">comment#0</a>, and diagnose the testcase from
<a href="show_bug.cgi?id=43944#c1">comment#1</a> as:
test.cc:28:5: error: no matching function for call to 'variadic'
variadic({0});
^~~~~~~~
test.cc:12:27: note: candidate template ignored: substitution failure: deduced
incomplete pack <(no value)> for template parameter 'T'
template<class... T> void variadic(T&&...) {}
~ ^
test.cc:32:5: error: no matching function for call to 'single'
single({0});
^~~~~~
test.cc:14:24: note: candidate template ignored: couldn't infer template
argument 'T'
template<class T> void single(T&&) {}
^
Note that we accept the
x = {0};
line now, as a call to the move assignment operator (that is, as "x = X{0};"),
because deduction for the templated operator= now fails due to failing to
deduce a complete value for parameter T.</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>