http://llvm.org/bugs/show_bug.cgi?id=6952
Summary: Clang allows redefinition of namespace-scope function
via friend instantiation
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Blocks: 6023
Created an attachment (id=4744)
--> (http://llvm.org/bugs/attachment.cgi?id=4744)
Test case
We do not diagnose [temp.friend]p4, where a friend definition inside a class
template that is instantiated twice is a redefinition error. Instead, we just
see that the friend definition was instantiated and skip it.
The attached test case attempts to illustrate the intended behavior for C++98
and C++0x (there were changes in [temp.friend]p4). Clang type-checks it without
complain.
Boost.Units relies on this check for some of its static type safety.
--
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