For assignment operator we check: if(this == &rhs)
, why not to check the same for self comparison in bool operator==(const MyClass& rhs)
?
For assignment we want to avoid to self assign a bunch of data. The same is for comparison. If it is a good practice to check for assignment, then it should be for comparison too.