home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!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: <1992Aug16.221328.4934@sunb10.cs.uiuc.edu>
- Sender: news@sunb10.cs.uiuc.edu
- Organization: University of Illinois at Urbana-Champaign
- References: <LVI.92Aug14161521@aste27.ida.liu.se>
- Date: Sun, 16 Aug 1992 22:13:28 GMT
- Lines: 23
-
- 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.
-
- >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
-