title: How to get the typeid of a void* pointer?
body: <p>I have a list of pointers to objects. These objects have nothing in common (i.e. no common base class); for better understanding: It is a list of objects that lie under the mouse cursor in a GUI.</p>
  
  <p>Now I would like to know what kind of object it is. A node, a node handle, a line segment, a tag, and so on. However I cannot use <code>typeid(*ptr)</code> since ptr is a <code>const void*</code>.</p>
  
  <p>Any solution for this? Can I force the usage of typeid since I know that the pointers always point to objects and not to mere values? Or is there no way around adding some fake common base class?</p>
  
  <p>(edit: Currently I'm doing it that way that I store a struct in the list which additionally stores the type of the object (as enum). Maybe I should change this to store a <code>type_info</code> object ...)</p>