[LLVMbugs] [Bug 8236] New: Rejects using constructor name as a template
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Sep 26 18:36:01 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=8236
Summary: Rejects using constructor name as a template
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: schaub-johannes at web.de
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
The following explicit specialization and instantiation look well-formed, but
clang complains
struct A {
template<typename T>
A() { }
};
template A::A<int>();
template<> A::A<float>() { }
"main1.cpp:6:13: error: qualified reference to 'A' is a constructor name rather
than a type wherever a constructor can be declared
template A::A<int>();"
It complains that it yields a constructor name even though we actually use it
in a context that a constructor name is perfectly viable for.
--
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