[llvm-bugs] [Bug 38269] New: no matching function for call to 'f'
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Jul 22 18:36:51 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38269
Bug ID: 38269
Summary: no matching function for call to 'f'
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: zhonghao at pku.org.cn
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
The code is as follow:
template<class T, class U> struct A { };
template<class... T, class ... U> void f( A<T,U>...p);
void g() {
f<int>(
A<int,unsigned>(),
A<short,unsigned short>()
);
}
clang++ rejects it:
code0.cpp:5:2: error: no matching function for call to 'f'
f<int>(
^~~~~~
code0.cpp:2:40: note: candidate template ignored: substitution failure :
deduced incomplete pack <int, (no value)> for template parameter 'T'
template<class... T, class ... U> void f( A<T,U>...p);
~ ^
1 error generated.
g++, instead, accepts it. BTW, T shall end up as {int,short}?
--
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/20180723/9c6524c5/attachment-0001.html>
More information about the llvm-bugs
mailing list