http://llvm.org/bugs/show_bug.cgi?id=10666
Summary: definition not emitted for friend operator overload
inside instantiated template class
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
This testcase involves templates, friends and operator overloading:
struct Empty {};
template<typename T> struct Helper {
void Method(const Helper<T> &bbox1) {
Helper<double> d;
}
friend void operator<<(Empty &, const Helper<T> &) {}
};
void test(Helper<double> helper) {
Empty os;
os << helper;
}
Clang does not emit the definition of operator<< (_ZlsR5EmptyRK6HelperIdE to be
specific) even though it emits a call to it.
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs