From 8728301744540063820
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109fba,ac06fef48c3c04df
X-Google-Attributes: gid109fba,public
X-Google-Thread: f78e5,ac06fef48c3c04df
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1995-01-25 07:11:34 PST
Path: nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!udel!gatech!swrinde!cs.utexas.edu!news.cs.utah.edu!news.cc.utah.edu!swillden
From: swillden@fcom.cc.utah.edu (Shawn Willden)
Newsgroups: comp.lang.c++,comp.std.c++
Subject: Re: friends and local classes
Followup-To: comp.lang.c++,comp.std.c++
Date: 25 Jan 1995 15:11:34 GMT
Organization: University Of Utah Computer Center
Lines: 32
Distribution: world
Message-ID: <3g5pn6$16p@news.cc.utah.edu>
References: <3g2ups$bhu@ra.ibr.cs.tu-bs.de>
NNTP-Posting-Host: icarus.weber.edu
X-Newsreader: TIN [version 1.1 PL8]
Xref: nntp.gmd.de comp.lang.c++:88007 comp.std.c++:11255

Andreas Rossberg (ti953017@rzcipa01.rz.tu-bs.de) wrote:

: 	class A
: 	{
: 	private:
: 		class B;
: 		friend class B;
: 		class B { /* ... */ };
: 	};

: This is tedious and even used to be illegal.

: Why are the rules that way? Could anybody give me a hint? However, IMO, the
: language should at least allow the terse notion of

: 		friend class B { /* ... */ };

Well, 
		class B { /* ... */ };
		friend B;

or
		friend class B;
		class B { /* ... */ };

are legal, and closer.

Shawn.

--
Shawn Willden
swillden@icarus.weber.edu


