Rule of three (C++ programming)
Appearance
The rule of three (also known as the Law of The Big Three or The Big Three) is a rule of thumb in C++ that claims that if a class or struct has one of the following it should probably have all three.
These three methods are created by the compiler automatically if they are not defined by the programmer and if the default compiler generated version does not fit the needs of the class in one case it will probably not fit in the other cases either.
An amendment to this rule is that if Resource Acquisition Is Initialization (RAII) is used the destructor may be left undefined. [1]