http://llvm.org/bugs/show_bug.cgi?id=8852
Summary: Definition of friend function inside the class is not
working if the function is declared in namespace scope
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
$ cat t.cpp
void foo();
struct S {
friend void foo() {}
};
int main() {
foo();
}
$ g++ t.cpp
$ clang t.cpp
Undefined symbols for architecture x86_64:
"foo()", referenced from:
_main in cc-hzoATp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--
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