<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:b762215@trbvn.com" title="ThePhD <b762215@trbvn.com>"> <span class="fn">ThePhD</span></a>
</span> changed
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - [cwg777] Diagnostic issued for function parameter pack following a default argument"
href="https://llvm.org/bugs/show_bug.cgi?id=23029">bug 23029</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>RESOLVED
</td>
<td>REOPENED
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>b762215@trbvn.com
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>FIXED
</td>
<td>---
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - [cwg777] Diagnostic issued for function parameter pack following a default argument"
href="https://llvm.org/bugs/show_bug.cgi?id=23029#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - [cwg777] Diagnostic issued for function parameter pack following a default argument"
href="https://llvm.org/bugs/show_bug.cgi?id=23029">bug 23029</a>
from <span class="vcard"><a class="email" href="mailto:b762215@trbvn.com" title="ThePhD <b762215@trbvn.com>"> <span class="fn">ThePhD</span></a>
</span></b>
<pre>This bug is still not fixed by the mentioned revision. When you actually use
the parameter pack, the old error rears its ugly head again. Minimal repro:
template <typename... Args>
void bark( int = 0, Args&&... args ) {}
int main ( int, char*[]) {
bark(); // fine
bark(1); // fine
bark(1, 2); // boom
return 0;
}
Given output:
main.cpp:2:31: error: missing default argument on parameter 'args'
void bark( int = 0, Args&&... args ) {}
^
main.cpp:7:6: note: in instantiation of function template specialization
'bark<int>' requested here
bark(1, 2);
^
1 error generated.
Expected:
Successful compilation.</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>