[Bug c++/57713] Template functions see friendship as inherited
w.shane.grant at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Jun 25 20:23:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57713
Shane <w.shane.grant at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Shane <w.shane.grant at gmail dot com> ---
Marking invalid since I think this was actually a case of not interpreting
friendship correctly. A simpler test case:
class Base {
private:
friend void foo();
void bar();
};
class Derived : public Base {};
void foo() { Derived().bar(); }
also compiles with no error because has access to Base (due to friendship) and
thus access to bar.
More information about the Gcc-bugs
mailing list