[llvm-bugs] [Bug 44107] New: class template argument deduction does not perform pointer decay
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Nov 21 13:36:56 PST 2019
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: unassignedclangbugs at nondot.org
Reporter: alisdairm at me.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191121/d95de520/attachment.html>
More information about the llvm-bugs
mailing list