Last Updated: June 6, 2026
C++ classes either manage a resource or they do not, and that single distinction decides how many special member functions a class has to write. The Rule of Zero says write none when possible. The Rule of Three is the older C++98 advice for resource-owning classes. The Rule of Five is the modern version that adds move operations. This chapter covers choosing which rule applies before writing code, and the discipline that keeps a class consistent once it is chosen.