<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - Difficult deducing template parameter that should be deducible by virtue of being a callable argument."
href="https://bugs.llvm.org/show_bug.cgi?id=43579">43579</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Difficult deducing template parameter that should be deducible by virtue of being a callable argument.
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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++17
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>danielmrussell@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Clang does not want to deduce what seems deducible to me. This code compiles
fine on MSVC and GCC, but clang reports,
error: class template partial specialization contains a template parameter that
cannot be deduced; this partial specialization will never be used
[-Wunusable-partial-specialization]
It refuses to work on any version of Clang including Trunk. Shouldn't this work
like it does on the other compilers? I realize it's not *quite* CTAD or a
function template, but isn't there more than enough information present for the
compiler to figure things out? Am I missing something here? Why does it work on
the other compilers?
Thanks!
CODE:
template <typename T>
struct system_traits
{};
template <typename ClassType, typename ReturnType, typename... A, typename...
B>
struct system_traits<ReturnType(ClassType::*)(std::vector<A>const&...,
std::vector<B>&...) const>
{
using result_type = ReturnType;
using arg_tupleA = std::tuple<A...>;
using arg_tupleB = std::tuple<B...>;
};</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>