[LLVMbugs] [Bug 9440] New: Clang doesn't trigger template instantiation to find friend function definitions (ADL)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Mar 9 08:46:20 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9440
Summary: Clang doesn't trigger template instantiation to find
friend function definitions (ADL)
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 googlemail.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Clang currently rejects this:
template<typename T>
struct A {
friend void f(A *) { }
};
int main() {
f((A<int>*)0);
}
main1.cpp:7:5: error: use of undeclared identifier 'f'
f((A<int>*)0);
^
Closed issue report 34 reassured that this code is valid.
--
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