[LLVMbugs] [Bug 7434] New: Fails to befriend forward declared class template in an enclosing namespace
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jun 21 00:04:43 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7434
Summary: Fails to befriend forward declared class template in
an enclosing namespace
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: chandlerc at gmail.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
% cat t2.cc
template <typename T> struct X;
namespace N {
class Y {
template<typename T> friend struct X;
int t;
};
}
template<typename T> struct X {
X() { (void)N::Y().t; }
};
X<char> x;
% ./clang -fsyntax-only t2.cc
t2.cc:9:22: error: 't' is a private member of 'N::Y'
X() { (void)N::Y().t; }
^
t2.cc:5:7: note: declared private here
int t;
^
1 error generated.
--
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