home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!mcsun!sunic!liuida!curofix!lvi
- From: lvi@ida.liu.se (Lars Viklund)
- Subject: References as class members
- Message-ID: <LVI.92Aug14161521@aste27.ida.liu.se>
- Sender: news@ida.liu.se
- Organization: CIS Dept, Univ of Linkoping, Sweden
- Distribution: comp
- Date: Fri, 14 Aug 1992 14:15:25 GMT
- Lines: 16
-
-
- Is the following class declaration legal?
-
- class X {
- X& r;
- };
-
- 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.
- GCC compiles it without complaining.
-
- --
- Lars Viklund | Email: lvi@ida.liu.se
- Programming Environments Laboratory | Phone: +46 13282689
- Department of Computer and Information Science | Fax : +46 13282666
- Linkoping University, S-581 83 LINKOPING, SWEDEN | Telex: 50966 UNILIN S
-