Supose I have a class containing many fields, and/or is constantly changing (in development), and all its fields are either natives or of not-necessarily-POD types which provide a satisfactory copy-constructor, but one - which might has even deleted or privatize its copy-constructor, yet provides me with ways of doing the copy as I need.
Now suppose I need it to have a copy-constructor of its own.
Am I bound to write the exhaustive (exhausting) field by field copy, or is there a cleaner, less exposed to bugs, way to achieve the same goal?
illustration code :
class Big {
public :
Big(Big const & big) : ? { ? }
protected :
int i1, i2, ... , i50;
float f1, f2, ... , f50;
CopyConstructableClass1 c1;
CopyConstructableClass2 c2;
...
CopyConstructableClass20 c20;
NonCopyConstructableClass ncc;
};
Thanks