Posted on 2013-05-17 15:00
魏尚堂 阅读(137)
评论(0) 编辑 收藏 引用
-
Make sure operator= is well-behaved when an object is assigned to itself. Techniques include comparing addresses of source and target objects, careful statement ordering, and copy-and-swap.
-
Make sure that any function operating on more than one object behaves correctly if two or more of the objects are the same.