關於assignment operator

1. 自賦值的情況: if (this == &rhs)

2. 返回值爲對象的reference: 爲了連等的情況。 (a=b)=c

3. exceptional safe 的assignment operator:
   A. http://www.cplusplus.com/articles/y8hv0pDG/
   B. Exceptional C++中, Item 9
   C. why can't  destructor throw?  More effective C++, Item 11
   D. What is exception safe?

4. 左值,右值問題

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章