Regardless of whether or not this is true, if all your copy constructors are designed to copy an array, then I would prefer not to write it and let the compiler generate it implicitly.
Also, I recommend following the chris tip in C ++ 11 and using std::array instead of C-style arrays:
#include <array> class MyClass { public: // In case you really want this to be public std::array<Class2, 100> arr; };
By the way, this will also allow you to initialize your array in the list of initializers of the copy constructor (but again, do this only if necessary):
class MyClass { public: MyClass() { } MyClass (const MyClass& other) : arr(other.arr) {}
Here is a living example .
source share