Let an example be given:
class Base {
Base (const Base & copyFrom) { globalRegister (* this); }
}
class Derived {
Derived (const Derived & copyFrom) : Base (copyFrom) {}
}
I read the suggestions for including the base copy constructor in the Derived initialization list for copying over the Base properties (as in the example).
However, I have a base copy constructor that passes itself (* this) to another object (to register with this object). This will be the case when I should actually use (implicitly or explicitly) the Base (default) constructor in the initialization list of the Derived copy constructor and call the base copy constructor only in the body of the Derived copy constructor, when in fact there is an object that can be attached by the base copy constructor ? Is Else (* this) a valid object?