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

            Bug ID: 44107
           Summary: class template argument deduction does not perform
                    pointer decay
           Product: clang
           Version: 9.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++17
          Assignee: unassignedclangb...@nondot.org
          Reporter: alisda...@me.com
                CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
                    llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk

This simple program shows the fail:

#include <utility>

void func() {}

int main() {
    std::pair y{"hello", func};
}


'func' is deduced as a function type, not decayed to a function pointer type. 
Similarly, the diagnostic message suggests that the string literal is deducing
as an array, rather than decaying to a pointer-to-element.

This same test compiles cleanly with gcc and Intel/EDG front ends in the online
compilers at Compiler Explorer:
   https://godbolt.org/z/dP38XN

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to