home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!wupost!m.cs.uiuc.edu!sunb10.cs.uiuc.edu!sparc10.cs.uiuc.edu!pjl
- From: pjl@sparc10.cs.uiuc.edu (Paul Lucas)
- Subject: Re: References as class members
- Message-ID: <1992Aug18.042640.13963@sunb10.cs.uiuc.edu>
- Sender: news@sunb10.cs.uiuc.edu
- Organization: University of Illinois at Urbana-Champaign
- References: <LVI.92Aug14161521@aste27.ida.liu.se> <1992Aug16.221328.4934@sunb10.cs.uiuc.edu>
- Distribution: usa
- Date: Tue, 18 Aug 1992 04:26:40 GMT
- Lines: 29
-
- In <1992Aug16.221328.4934@sunb10.cs.uiuc.edu> pjl@sparc10.cs.uiuc.edu (Paul Lucas) writes:
-
- >In <LVI.92Aug14161521@aste27.ida.liu.se> lvi@ida.liu.se (Lars Viklund) writes:
-
-
- >>Is the following class declaration legal?
-
- >>class X {
- >> X& r;
- >>};
-
- >*****> Yes.
-
- *****> I read the question bass-ackwards...could have *sworn* it said
- illegal. Now then, given ARM 12.6.2 and some inferrential
- ability, it's not (currently) legal.
-
- >>According to ARM it should be OK, but the ObjectCenter 1.1 compiler
- >>and Sun CC 2.1 claims that the reference must have a constructor.
-
- >*****> And they're both correct.
-
- >>GCC compiles it without complaining.
-
- >*****> Then GCC has a bug.
- --
- - Paul J. Lucas University of Illinois
- AT&T Bell Laboratories at Urbana-Champaign
- Naperville, IL pjl@cs.uiuc.edu
-