Why must the copy assignment operator return a reference/const reference?
Strictly speaking, the result of a copy assignment operator doesn’t need to return a reference, though to mimic the default behavior the C++ compiler uses, it should return a non-const reference to the object that is assigned to (an implicitly generated copy assignment operator will return a non-const reference – C++03: 12.8/10). I’ve seen a … Read more