This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GCC 3.4.3 and fiend decleration.


Hello everybody.

First of all i'm sorry to post to this list, but it seems as if it was the 
only list read by some people.

I've a problem with a code as follows:
class a
{
protected:
virtual int f() const;
};

class b
{
friend int a::f() const;  // error - a::f() is protected and inaccessable
};

It worked on prior versions of GCC (according to people in my company), and 
i've found several postings on the web about this topic.

What i'd like to know is:
Will this be the same for future versions of GCC? What else could i use for 
this?

I've had a similar piece of code out of Stroustrups c++ "bible"... 

Thank you,
Grabler Georg


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]