[llvm-bugs] [Bug 42805] New: Failure to match template function

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jul 29 01:45:04 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=42805

            Bug ID: 42805
           Summary: Failure to match template function
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: boris at pointx.org
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

template<typename... Args>
void func(void(*)(Args...)) {}

template <typename T>
using param = int;

template <typename... Args>
void func2(param<Args>...) {}

void test()
{
    func(&func2<>);
}

// prog.cc:12:5: error: no matching function for call to 'func'
//     func(&func2<>);
//     ^~~~
// prog.cc:2:6: note: candidate function [with Args = <>] not viable: no
overload of 'func2' matching 'void (*)()' for 1st argument
// void func(void(*)(Args...)) {}

-- 
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/20190729/d4c0bfaf/attachment.html>


More information about the llvm-bugs mailing list