When can I compare pointers to the same object in c++?
<p>For example, I have some class hierarchy (possibly, with all kinds of inheritance - public, private, public virtual, multi-inheritance, etc.):</p>

<pre><code>class A {
  int a;
public:
  virtual ~A() {}
};

class B: public A { int b; };
class C: public virtual B { int c; };
class E: public virtual B { int e; };
class F: public C, public E { int f; };
</code></pre>

<p>Using casts I get pointers to every sub-object of the main "big" object:</p>

<pre><code>F * f = new F;
E * e = f;
C * c = f;
B * b = f;
A * a = f;
</code></pre>

<p>What pairs of these pointers may I compare for equality (operator==) and why?
Will the comparison use delta-logic or some other technique?</p>

<p>What are the possible situations, when I can't compare pointers to the same complex object?
What kind of object it can be?</p>

<p>I expect, that all of the pointers to the same object are always equal.</p>
