When to define copy/assgnment constructors

From: Birt (birta_at_imp.com)
Date: 05/31/04


Date: Sun, 30 May 2004 23:31:47 GMT

My understanding about defining your own copy and assignment constructors is
whenever there is a member of pointer type. Is this true or is there any
exception to this"rule"?

How about when you define a class which doesn't have a pointer type variable
as member and this class could be derived, and a new member of pointer type
could be added in the future? Does this mean that all classes that will be
inherited in the future should be defined with its copy and assignment
constructor?

Is it right to say that either compiler-generated or programmer-provided
copy and assignment constructors will do member-wise object copying or
assignment all the time?

Is there any place in C++ that copying between objects could be bit-by-bit?

Thanks!



Relevant Pages