Effective C++ Item 10 Have assignment operators return a reference to *this

时间:2014-02-28 19:03:58   收藏:0   阅读:438

If you want to concatenate assignment like this

int x, y, z;
x = y = z = 15;

The convention is to make the assignment operators return a reference to *this.

Effective C++ Item 10 Have assignment operators return a reference to *this,布布扣,bubuko.com

原文:http://www.cnblogs.com/xinsheng/p/3572668.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!