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

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!mcsun!sunic!liuida!curofix!lvi
  3. From: lvi@ida.liu.se (Lars Viklund)
  4. Subject: References as class members
  5. Message-ID: <LVI.92Aug14161521@aste27.ida.liu.se>
  6. Sender: news@ida.liu.se
  7. Organization: CIS Dept, Univ of Linkoping, Sweden
  8. Distribution: comp
  9. Date: Fri, 14 Aug 1992 14:15:25 GMT
  10. Lines: 16
  11.  
  12.  
  13. Is the following class declaration legal?
  14.  
  15. class X {
  16.     X& r;
  17. };
  18.  
  19. According to ARM it should be OK, but the ObjectCenter 1.1 compiler
  20. and Sun CC 2.1 claims that the reference must have a constructor.
  21. GCC compiles it without complaining.
  22.  
  23. --
  24. Lars Viklund                                       | Email: lvi@ida.liu.se
  25. Programming Environments Laboratory                | Phone: +46 13282689
  26. Department of Computer and Information Science     | Fax  : +46 13282666
  27. Linkoping University, S-581 83  LINKOPING, SWEDEN  | Telex: 50966 UNILIN S
  28.