条款10 令operator=返回一个reference to *this
2017-05-08 21:16
274 查看
显而易见
令赋值运算符返回一个引用有利于表达式连续赋值,其他需要连续操作的函数也如此,有一点需要注意,一般重载赋值运算符时,要记得判断是否是自己给自己赋值。
令赋值运算符返回一个引用有利于表达式连续赋值,其他需要连续操作的函数也如此,有一点需要注意,一般重载赋值运算符时,要记得判断是否是自己给自己赋值。
相关文章推荐
- 《Effect C++》学习------条款10:令 operator= 返回一个 reference to *this
- 条款10:令operator=返回一个reference to *this
- Effective C++ 条款10解读: 令operator= 返回一个reference to *this
- Effective C++:条款10:令operator=返回一个reference to *this。
- 条款10 令operator=返回一个reference to *this
- 条款10:让operator=返回一个reference to *this
- 《Effective C++》学习笔记条款10 令operator= 返回一个reference to *this
- 条款10:令operator=返回一个reference to *this(Have assignment operators return a reference to *this.)
- 条款10:令operator = 返回一个reference to *this
- 条款10:令operator=返回一个reference to * this
- 条款10-11:令operator=返回一个reference to *this
- 条款10:令operator=返回一个reference to *this
- Effective C++ 条款10: 令operator= 返回一个reference to *this
- 读书笔记《Effective c++》 条款10 令operator= 返回一个reference to *this
- 条款10:令operator=返回一个reference to * this(Have assignment operators return a reference to *this)
- 【effective c++】条款10:令operator=返回一个reference to *this
- 条款10:令operator= 返回一个reference to *this
- 条款10:令operator=返回一个reference to *this
- 条款10:令operator= 返回一个reference to *this
- 《Effective C++ 》条款10:令operator=返回一个reference to *this