Rule of Three、Five 与 Zero | C++

本章覆盖:destructor;copy constructor;copy assignment;move constructor;move assignment;Rule of Three;Rule of Five;Rule of Zero;优先使用标准 RAII 成员让编译器生成 special member;手写五件套往往意味着类型资源模型需要认真审视。

本章知识点

  • destructor
  • copy constructor
  • copy assignment
  • move constructor
  • move assignment
  • Rule of Three
  • Rule of Five
  • Rule of Zero
  • 优先使用标准 RAII 成员让编译器生成 special member
  • 手写五件套往往意味着类型资源模型需要认真审视