<html>
<head>
<base href="https://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 --- - Accepts invalid when undeduced context encountered deducing from a trailing parameter pack" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23939&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=cPt0aKcbjfrRTRdd07VY2O7SBbg-CIpGjY4EzSCDMT8&s=Q5UrldwHw7zY73Szg8Id65D1maaa89aOFnSLcGI5_X0&e=">23939</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Accepts invalid when undeduced context encountered deducing from a trailing parameter pack
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</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>hstong@ca.ibm.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>In the call to "f" from "h" below, the deduction for T@1 should find both
"fptype" and "Func" and fail.
### SOURCE (<stdin>):
template <typename ...T> struct A;
void g();
void g(bool);
typedef void (*fptype)();
struct Func { operator fptype(); } func;
template<typename ...T> void f(A<T ...> *ap, T ...b);
void h(A<fptype, fptype> *ap) { f(ap, g, func); }
### COMPILER INVOCATION:
clang++ -std=c++11 -c -x c++ -
### ACTUAL OUTPUT:
(Clean compile).
### EXPECTED OUTPUT:
(Error message).
### COMPILER VERSION INFO:
clang version 3.7.0 (trunk)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/lib/gcc/ppc64le-redhat-linux/4.8.2
Found candidate GCC installation: /usr/lib/gcc/ppc64le-redhat-linux/4.8.3
Selected GCC installation: /usr/lib/gcc/ppc64le-redhat-linux/4.8.3
Candidate multilib: .;@m64
Selected multilib: .;@m64</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>