Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cimshop!davidm From: cimshop!davidm@uunet.UU.NET (David S. Masterson) Newsgroups: comp.lang.c++ Subject: Copy constructors Message-ID: Date: 9 Jan 91 01:43:02 GMT Sender: davidm@cimshop.UUCP Distribution: comp Organization: Consilium Inc., Mountain View, California Lines: 24 X-Posting-Software: GNUS 3.12 [ NNTP-based News Reader for GNU Emacs ] I'm looking for an interpretation of what is said in the ARM. In section 12.8, it talks about copy constructors and generating bitwise copies and/or bitwise assignments and: "The programmer may define one or both of these. If not defined by the programmer, they will be defined as memberwise assignment and memberwise initialization of the members of X, respectively." How is memberwise assignment or initialization meant to handle virtual functions and the hidden virtual function table pointer? Is the Vtabptr left alone in this? The reason I ask this has to do with transmitting of objects from one process to another. Assuming that type of the object is known after transmission, it should be possible to cast the transmission buffer to that type and copy construct a true object of that type using the buffer as input. Does this make sense with respect to section 12.8 in the ARM? -- ==================================================================== David Masterson Consilium, Inc. (415) 691-6311 640 Clyde Ct. uunet!cimshop!davidm Mtn. View, CA 94043 ==================================================================== "If someone thinks they know what I said, then I didn't say it!"