The Rule of Three

The Rule of Three

Content #

控制对象的拷贝的三个操作:

  1. the copy constructor
  2. copy-assignment operator
  3. destrutor

定义这三个操作的两条规则分别是什么?

  1. Classes That Need Destructors Need Copy and Assignment.
  2. Classes That Need Copy Need Assignment, and Vice Versa.

From #