This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: friends and inner classes
- To: Nyny dot sxthree at penfeld dot tls dot mms dot fr (Nyny), egcs-bugs at cygnus dot com
- Subject: Re: friends and inner classes
- From: Jason Merrill <jason at cygnus dot com>
- Date: 05 Jun 1998 01:32:10 -0700
- References: <3576D533.279CA15C.cygnus.egcs@penfeld.tls.mms.fr>
>>>>> Nyny <Nyny.sxthree@penfeld.tls.mms.fr> writes:
> foo.cc:10: member `foo::func(foo::bar *)' declared as friend before type
> `foo' defined
> C++ draft of dec 96 (Where can I get a newer one ?????) says that the
> identifier `foo' must be defined in the scope of the class definition. I
> think g++ is wrong at least with the error message cuz foo is indeed
> defined. Am I missing something ??
No, you're right. g++ is wrong. One day this will get fixed. Actually, I
planned to fix this when I implemented namespaces, but Martin beat me to it.
Jason