Explain the rule of three
Show answer and explanation
If a class directly manages a resource and needs a user-defined destructor, it commonly also needs a copy constructor and copy assignment operator with coherent ownership semantics. This Rule of Three is a warning to define or delete the whole copy contract.
If a class directly manages a resource and needs a user-defined destructor, it commonly also needs a copy constructor and copy assignment operator with coherent ownership semantics. This Rule of Three is a warning to define or delete the whole copy contract.
Connect the conclusion directly to the type, lifetime, ownership, overload-resolution rule, or library contract present in the question. State implementation dependence or a violated precondition explicitly instead of merely guessing output.