<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Unexpected error with variadic template function"
href="http://llvm.org/bugs/show_bug.cgi?id=22191">22191</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Unexpected error with variadic template function
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.5
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++11
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>zeratul976@hotmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>For the following code:
template <typename, typename...>
class C {};
template <typename... V>
void foo(C<V...>);
int main()
{
C<int, double> c;
foo(c);
}
clang 3.5 gives the following error:
test.cpp:10:5: error: no matching function for call to 'foo'
foo(c);
^~~
test.cpp:5:6: note: candidate template ignored: substitution failure [with
V = <>]: too few template arguments for class template 'C'
void foo(C<V...>);
^ ~
I believe this error is bogus. While it's true that instantiating with template
function with [V = <>] would produce an error, there is no reason to perform
that instantiation. The only instantiation that needs to be performed is [V =
<int, double>], and that doesn't produce an error.
GCC 4.9.2 compiles this code successfully.</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>