Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!motcid!stephens From: stephens@motcid.UUCP (Kurt Stephens) Newsgroups: comp.lang.c++ Subject: Re: GC, TC++ 1.01 calls X::X(X& (*this))! Keywords: GC, garbage collection, TC++, c++, copy constructors Message-ID: <6432@celery34.UUCP> Date: 6 Feb 91 18:39:14 GMT References: <6309@celery34.UUCP> <70273@microsoft.UUCP> Distribution: comp Organization: Motorola Inc., Cellular Infrastructure Div., Arlington Heights, IL Lines: 18 jimad@microsoft.UUCP (Jim ADCOCK) writes: >I've been looking for the "correct" answer to these kinds of question >on comp.std.c++ too. The questions being basically, what kinds of >copies are allowed and/or not allowed, including in what situations >is a compiler allowed to make a copy at the same address as a previous >object, and do functions return by copy. To copy construct onto this'self doesn't make any sence at all. It should not be allowed. A copy constructor should be *constructing* a NEW object. Kurt A. Stephens Foo Foo::Foo(){return Foo();} stephens@void.rtsg.mot.com "When in doubt, recurse." -- Kurt A. Stephens Foo Foo::Foo(){return Foo();} stephens@void.rtsg.mot.com "When in doubt, recurse."