[llvm-bugs] [Bug 52368] New: Class template argument deduction fails in case of function type argument
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Oct 30 22:27:31 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=52368
Bug ID: 52368
Summary: Class template argument deduction fails in case of
function type argument
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: fchelnokov at gmail.com
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
In the following program Clang is unable to perform class template argument
deduction:
```
template<typename T>
struct A{
A(T f()){ f(); }
};
int foo() { return 1; }
int main() {
[[maybe_unused]] A y = foo; // Clang error
}
```
GCC accepts it successfully, demo: https://gcc.godbolt.org/z/PKe6T5aW5
Related discussion: https://stackoverflow.com/q/69778510/7325599
--
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/20211031/ae6d3c6f/attachment.html>
More information about the llvm-bugs
mailing list