Why, if I do not explicitly refer to the GameBoard constructor, then will the default constructor be called?
If you did not write any explicit copy constructor for Game , then the compiler would generate this copy of gb for you. On the other hand, at the moment you explicitly define your own copy constructor, the compiler thinks: "Well, this guy really knows what he is doing, so give him full control ."
With full control, you are also responsible for clearly indicating all the actions you want to take when creating a copy. If you do not specify any actions, then the compiler must accept that the default mechanism for building objects is accepted. The default mechanism for building objects is to call the default constructor.
Since you seem to know what you are doing, the compiler will not make any assumptions about the correct build procedure for your member variables. You need complete control, now you have: forgot something? You get the default construct.
if I do not explicitly call the GameBoard assignment operator, then no assignment occurs. Why?
The answer is pretty similar. By explicitly defining your own operator = , you tell the compiler that you want full control over how objects are assigned. The compiler will not try to get in the way by making assumptions that may be incorrect. Instead, he will simply put aside and give you all the power to make decisions.
On the other hand, suppose the compiler silently generated the assignment gb = g.gb , but for some (hopefully good) reason you did not want this assignment to be executed: how would you tell the compiler not to execute it if the default behavior was to generate such an instruction?
Also, if itβs not really required, itβs good programming practice that allows the compiler to implicitly create a copy / move constructor, destructor and copy / move assignment operator for your class: for more information see this article by R. Martinho Fernandes on the so-called Rule zero .
Hope this helped clarify.