[comp.lang.c++] bitwise copy in G++

robison@m.cs.uiuc.edu (05/12/89)

I hear that the 2.0 release of AT&T C++ does not do bitwise copy for
class assignments, but rather copies everything but the v-table pointer.
GNU C++ already seems to do this.  My question is, suppose I really want
to do inline bitwise copy?  Is there a way to specify inline bitwise copy?
For example, is there a way to make the 'copy' function below do
bitwise copy, so that 'copy' works even if pointer 't' points to
uninitialized memory?  I would prefer a method compatible with all C++ 
compilers if such exists.  [No giggles, please]

	class base {
		int yellow,orange;
		virtual void burp();
	};
	
	class derived: public base {
		int purple;	
	};
	
	void copy( derived* s, derived* t ) {
		*t = *s;
	}

Arch D. Robison
University of Illinois at Urbana-Champaign

UUCP: {pur-ee,convex}!uiucdcs!robison
Internet: robison@CS.UIUC.EDU