[LLVMbugs] [Bug 6620] New: Unnamed namespace problem
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Mar 15 04:54:48 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=6620
Summary: Unnamed namespace problem
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=4522)
--> (http://llvm.org/bugs/attachment.cgi?id=4522)
unnamed namespace example
The attached code compiles in g++, but not in clang++.
Note that the following does compile, where we do not close and reopen the
numeric namespace.
This blocks boost::accumulate.
namespace numeric {
namespace op {
struct greater {};
}
namespace {
extern op::greater const greater;
}
namespace {
op::greater const greater = op::greater();
}
template<typename T, typename U>
int f(T& l, U& r)
{ numeric::greater(l, r); }
}
--
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