title: Can type_info pointers be used to distingush types in C++?
body: <p>I have a set of polymorphic C++ classes and they are all instantiated by the same module (Windows DLL). Now having two pointers to such classes and having called <code>typeid</code>:</p>
  
  <pre><code>SomeCommonBase* first = ...; //valid pointer
  SomeCommonBase* second = ...; //valid pointer
  const type_info&amp; firstInfo = typeid( first );
  const type_info&amp; secondInfo = typeid( second );
  </code></pre>
  
  <p>can I compare retrieved <code>type_info</code> addresses</p>
  
  <pre><code>if( &amp;firstInfo == &amp;secondInfo ) {
     //objects are of the same class
  } else {
     //objects are of different classes
  }
  </code></pre>
  
  <p>or use <code>==</code></p>
  
  <pre><code>if( firstInfo == secondInfo ) {
     //objects are of the same class
  } else {
     //objects are of different classes
  }
  </code></pre>
  
  <p>to detect whether objects are of (exactly) the same class or of different classes? Is it guaranteed to work when objects are instantiated from within the same module?</p>