Equals method implemented in the class
Sorry to bump this one year old question, but there is something inherently wrong in your equality check if you ever extend to more than one level of inheritance.

Consider a class Foo deriving from Circle, assuming the same implementation (with changed types of course).

Foo foo;
Circle circle;
Shape &amp; shapeFoo = foo;
Shape &amp; shapeCircle = circle;

// these two should behave the same, but they don't:
std::cout &lt;&lt; (shapeFoo == shapeCircle) &lt;&lt; std::endl;
std::cout &lt;&lt; (shapeCircle == shapeFoo) &lt;&lt; std::endl;


Why does this fail?

shapeFoo == shapeCircle will call shapeFoo.Equals(shapeCircle) which will be dispatched on the implementation of Equals in class Foo. There the dynamic_cast&lt;Foo const *&gt; will fail, correctly returning false.

However shapeCircle == shapeFoo will call shapeCircle.Equals(shapeFoo) which will be dispatched on the implementation of Equals in class Circle. There the dynamic_cast&lt;Circle *&gt; will succeed (as Foo is a descendant of Circle). Then the method will compare only the attributes of Circle, probably returning true.