[LLVMbugs] [Bug 10093] New: clang disallows to instantiate template for typedefed class
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jun 6 15:16:39 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10093
Summary: clang disallows to instantiate template for typedefed
class
Product: clang
Version: trunk
Platform: Other
OS/Version: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: yuri at tsoft.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Created an attachment (id=6701)
--> (http://llvm.org/bugs/attachment.cgi?id=6701)
testcase
I get such warning with typedef.
st1.C:14:21: warning: qualifier in explicit instantiation of 'Cls<int>::less'
requires a template-id (a typedef is not permitted)
template bool TCls::less(const TCls*, const TCls*);
And no warning without the typedef.
There is no danger in allowing such instantiation. This should be allowed for
better flexibility of templateed code.
gcc (as of 4.6.0) allows such instantiation.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list