The big three are a copy constructor, copy assignment operator, and destructor. When a class manages dynamic memory or limited resources such as sockets, files, or database connections, these operations belong to its class invariant. section 7.6
Big three
The big 3 is the C++ special-member-function set consisting of a copy constructor, copy assignment operator, and destructor.
How 100 C++ Mistakes and How to Avoid Them covers it
- How deep it goes
- Explains copying and destruction through shared-resource failure, deep copying, assignment, and move-enabled modernization.
- Examples
- Uses Page and TextSection listings to contrast shared pointers, uniqueness-preserving copies, and defaulted move operations.
- What you can do after
- Apply it by implementing deep-copy construction, copy assignment, and destruction, then modernize ownership with unique_ptr and move operations.
- How it connects
- Connects resource management with class invariants, dynamic memory, copy semantics, move semantics, and unique_ptr.
Also explained in
-
Object-Oriented Software Design in C++A C++ class-design rule grouping the destructor, copy constructor, and copy assignment operator as special members that may need coordinated implementation.
-
Learn C++ by ExampleThe rule of three is a C++ resource-management guideline stating that a class defining a destructor, copy constructor, or copy assignment operator will generally need to define all three.
Compare how 3 books explain big three →
Related concepts
- big fivecontrasts with · The rule of five is a C++ guideline that classes managing resources should consider defining a destructor, copy constructor, copy assignment operator, move constructor, and move assignment operator.
- destructorincludes · A destructor is an operation associated with an object or value that performs cleanup when its lifetime ends.
- copy constructorincludes · A copy constructor is a constructor that initializes a new object from an existing object of the same class or type.
This explainer was generated by Manning's knowledge graph from the text of 100 C++ Mistakes and How to Avoid Them. The section links point to the parts of the book it draws on.


