[LLVMbugs] [Bug 7138] New: clang incorrectly double-instantiates friend of template class
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri May 14 01:51:26 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7138
Summary: clang incorrectly double-instantiates friend of
template class
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: chris at bubblescope.net
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Created an attachment (id=4890)
--> (http://llvm.org/bugs/attachment.cgi?id=4890)
Friend example
The attached code is reduced from a boost test which should fail, but passes in
clang++.
This technique is used to stop inconsistencies in boost::units, so the
compile-invalid can lead to invalid code (from the library point of view) being
compiled.
Problematic code:
template<class > struct base_dimension
{
friend int boost_units_is_registered( )
{
}
};
struct int1 : base_dimension<int>
{};
struct dim2 : base_dimension<dim2>
{};
--
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