home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!gatech!concert!decwrl!borland.com!pete
- From: pete@borland.com (Pete Becker)
- Subject: Re: Making a constructor fail
- Message-ID: <1992Dec11.175120.26223@borland.com>
- Originator: pete@genghis.borland.com
- Sender: news@borland.com (News Admin)
- Organization: Borland International
- References: <k801f5+@rpi.edu> <1992Dec3.222414.3781@borland.com> <vjf2w#+@rpi.edu>
- Distribution: usa
- Date: Fri, 11 Dec 1992 17:51:20 GMT
- Lines: 15
-
- In article <vjf2w#+@rpi.edu> nelsonc@colossus.cs.rpi.edu (Chris Nelson) writes:
- >Presumably, I could also override the new operator for the class so
- >that IT tested the return flag from the constructor and deallocated
- >the object and returned NULL if the allocation in the constructor
- >failed?
- >
- > Chris
- >
- Isn't there some saying to the effect that "'presume' makes a 'pres'
- of 'u' and 'me'"? Unfortunately, there is nothing in the language that
- requires that operator new get control after the
- constructor is executed, so you can't use it to check whether construction
- succeeded.
- -- Pete
-
-