[LLVMbugs] [Bug 9103] New: encapsulation and friend functions
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Jan 29 09:13:49 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9103
Summary: encapsulation and friend functions
Product: clang
Version: 2.8
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: tim at klingt.org
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
this code does not compile with clang++, although it does with g++, icc and
comeau's online compiler:
struct base
{
protected:
static void foo(void) {}
};
struct cls: base
{
friend void bar(void)
{
base::foo();
}
};
clang++ complains with:
x.cpp:11:15: error: 'foo' is a protected member of 'base'
base::foo();
^
x.cpp:4:17: note: declared protected here
static void foo(void) {}
^
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