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
Effective C++ Item 10 Have assignment operators return a reference to *this