[LLVMbugs] [Bug 8002] New: Dependent conversion function names looked up in dependent bases
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Aug 26 14:43:00 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=8002
Summary: Dependent conversion function names looked up in
dependent bases
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
This code is ill-formed. Unqualified names should not be looked up in dependent
base classes, no matter whether they are dependent or not, according to the
Standard.
template<typename T>
struct A {
operator int() { return 0; }
};
template<typename T>
struct B : A<T> {
int f() { return operator T(); }
};
int main() {
return B<int>().f();
}
Clang accepts it, though. And it's easy to construct an rejects-valid for this,
just add another non-dependent base that also has an "operator int" declared,
and you wrongly get an ambiguity diagnostic.
--
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