If you want to concatenate assignments like:
1 | int x, y, z; |
The convention is to make the assignment operator return a reference of *this. And then this applies to all assignment operators something like +=, -=, etc.. It’s just an convention to follow, but there is no reason to not follow it:
1 | class Widget |
And I’ll talk about handle self assignment in next post.