[llvm-bugs] [Bug 30236] New: Fails deduction of parameter pack for pack of function parameter types

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 1 05:59:18 PDT 2016


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

            Bug ID: 30236
           Summary: Fails deduction of parameter pack for pack of function
                    parameter types
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++14
          Assignee: unassignedclangbugs at nondot.org
          Reporter: r.hl at gmx.net
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

template <typename... T>
void f( void(...t)(T) );
template <typename... T>
void g( void(t)(T) );

int main() {
    void h(int);
    f(h); // Error
    g(h); // Ok?
}

This seems inconsistent, because the deduction of the pack T in the call to f
is done by performing deduction of void(T) against void(int), that is, the
deduction step necessary for the call to g (which succeeds).

The error message suggests that deduction is performed with the decayed type of
'g':

 > could not match 'void (T)' against 'void (*)(int)'

Presumably it would succeed if A is left as 'void(int)'.

-- 
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/20160901/57ab114b/attachment.html>


More information about the llvm-bugs mailing list