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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to