class item {
public:
item& operator=(const item &rh) {
...
...
return *this;
}
};
Is the following signatur
The signature with void would not allow chained assignments:
a = b = c;
(Look at Johannes' answer for one more example of a usage pattern based on assignment returning the assigned value.)
That's why using such signatures is discouraged. However, if I am not mistaken, you actually can use such a signature.