Equality testing is one place where it frequently seems as if it would be nice if one could change the types of member function arguments. Consider the following:
class Shape {
public:
boolean equals (Shape)
{ return false; }
...
};
class Triangle : public Shape {
public:
boolean equals (Triangle);
...
};
class Square : public Shape {
public:
boolean equals (Square);
...
};