title: Static cast allows conversion of object pointers but not integers
body: <p>Why does static cast allow an upcast or downcast between pointers to objects derived or base as below, but in the case of casting between a char* and int* or vice versa int* to char*, there is a compilation error?</p>
  
  <p>Casting between different pointers to objects is just as bad I believe.</p>
  
  <pre><code>// compiles fine
  class Base {};
  class Derived: public Base {};
  Base * a = new Base;
  Derived * bc = static_cast&lt;Derived*&gt;(a);
  
  // Gives an invalid static cast error during compilation
  char charVar = 8;
  char* charPtr = &amp;charVar;
  int* intPtr = static_cast&lt;int*&gt;(charPtr);
  </code></pre>