[llvm-bugs] [Bug 51899] New: [c++] variadic template specialization doesn't consider template parameter default value
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Sep 18 06:56:35 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51899
Bug ID: 51899
Summary: [c++] variadic template specialization doesn't
consider template parameter default value
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: nickhuang99 at hotmail.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
The following code snippet is accepted. But I thought the template
specialization should consider "First" is using default type "char" instead of
"int". Is this a bug? (I tried in godbolt.org and both GCC and MSVC++ all
behave like clang. However, still I doubt this is correct. Can someone verify
this?
template<class...Ts,class First=char>
void foo(First,Ts...){}
template<>
void foo<int*>(int,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/20210918/73eb4432/attachment.html>
More information about the llvm-bugs
mailing list