Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!mcvax!ukc!stl!stc!root44!hrc63!pj From: pj@hrc63.co.uk (Mr P Johnson "Baddow") Newsgroups: comp.lang.c++ Subject: Re: Constructors and new Message-ID: <625@hrc63.co.uk> Date: 26 Jun 89 14:40:36 GMT References: <2684@ssc-vax.UUCP> <43984c6e.1ad5a@apollo.COM> Organization: GEC Hirst Research Centre, Wembley, England. Lines: 19 In article <43984c6e.1ad5a@apollo.COM>, vasta@apollo.COM (John Vasta) writes: > > Checking the value of 'this' only makes sense if you want to assign to it. > The statement from The Book is in the section about taking over the storage > allocation mechanism; the first sentence in 5.5.7 is > > "When assigning to this in a constructor, the value of this is undefined > until that assignment." Thats in The Book, but Stroustrup has written "The Evolution of C++" which describes member operator functions for new and delete which do this sort of think much more neatly. At least one compiler (Oregon) now does it this way. -- Paul Johnson, | `The moving finger writes, And having writ, moves on,' GEC-Marconi Research | Omar Kyham when contemplating `vi'. ------------------------------------------------------------------------------ The company has put a radio inside my head: it controls everything I say!