home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!mcsun!hp4at!rcvie!rcsw50!se_rossb
- From: se_rossb@rcvie.co.at (Bernhard Rossboth)
- Subject: Re: why `int X: :X()' ?
- Message-ID: <1993Jan11.160139.23673@rcvie.co.at>
- Sender: news@rcvie.co.at
- Nntp-Posting-Host: rcsw50
- Reply-To: se_rossb@rcvie.co.at
- Organization: Alcatel ELIN Research
- References: <5501@miramon.lulea.trab.se>
- Date: Mon, 11 Jan 1993 16:01:39 GMT
- Lines: 17
-
- In article 5501@miramon.lulea.trab.se, jbn@lulea.trab.se (Johan Bengtsson) writes:
- >Matt Wette (mwette@csi.jpl.nasa.gov) wrote:
- >
- >: Why are constructor and destructor functions usually declared to return
- >: ints when the usage typically warrents a `void' declaration.
- >
- >The "default int" rule does not apply to constructors and destructors.
- >You can't return an "int" from those functions. You can't explicitly
- >mark them as procedures (void) either.
-
- "No return type (not even void) can be specified for a constructor."
-
- Ellis & Stroustrup: The Annotated C++ Reference Manual page 265.
-
-
-
-
-