[llvm-bugs] [Bug 43579] New: Difficult deducing template parameter that should be deducible by virtue of being a callable argument.
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Oct 6 12:13:14 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43579
Bug ID: 43579
Summary: Difficult deducing template parameter that should be
deducible by virtue of being a callable argument.
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++17
Assignee: unassignedclangbugs at nondot.org
Reporter: danielmrussell at gmail.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
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...>;
};
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191006/5c046ddb/attachment.html>
More information about the llvm-bugs
mailing list