Topic
rule of three.
a rule of thumb in C++ (prior to C++11) stating that if a class defines one (or more) of destructor, copy constructor, or copy assignment operator, then it should probably explicitly define all three
The journal
Open the journal →The conversation starts in the journal — be the first to post.
About rule of three
The rule of three and rule of five are rules of thumb in C++ for the building of exception-safe code and for formalizing rules on resource management. The rules prescribe how the default members of a class should be used to achieve these goals systematically.
Everything about rule of three →