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

  1. if(&rhs==this)
  2. copy and swap
posted on 2014-08-11 11:28  Deutschland  阅读(99)  评论(0)    收藏  举报