11——在operator=中处理自我赋值

时间:2023-03-09 17:47:37
11——在operator=中处理自我赋值

在operator=函数中加一个测试:

  1. if(&rhs==this)
  2. copy and swap

相关文章