home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / cplus / 12403 < prev    next >
Encoding:
Text File  |  1992-08-16  |  967 b   |  35 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!wupost!m.cs.uiuc.edu!sunb10.cs.uiuc.edu!sparc10.cs.uiuc.edu!pjl
  3. From: pjl@sparc10.cs.uiuc.edu (Paul Lucas)
  4. Subject: Re: References as class members
  5. Message-ID: <1992Aug16.221328.4934@sunb10.cs.uiuc.edu>
  6. Sender: news@sunb10.cs.uiuc.edu
  7. Organization: University of Illinois at Urbana-Champaign
  8. References: <LVI.92Aug14161521@aste27.ida.liu.se>
  9. Date: Sun, 16 Aug 1992 22:13:28 GMT
  10. Lines: 23
  11.  
  12. In <LVI.92Aug14161521@aste27.ida.liu.se> lvi@ida.liu.se (Lars Viklund) writes:
  13.  
  14.  
  15. >Is the following class declaration legal?
  16.  
  17. >class X {
  18. >    X& r;
  19. >};
  20.  
  21. *****>    Yes.
  22.  
  23. >According to ARM it should be OK, but the ObjectCenter 1.1 compiler
  24. >and Sun CC 2.1 claims that the reference must have a constructor.
  25.  
  26. *****>    And they're both correct.
  27.  
  28. >GCC compiles it without complaining.
  29.  
  30. *****>    Then GCC has a bug.
  31. -- 
  32.     - Paul J. Lucas                University of Illinois    
  33.       AT&T Bell Laboratories        at Urbana-Champaign
  34.       Naperville, IL            pjl@cs.uiuc.edu
  35.