title: Downcasting using dynamic_cast returns null
body: <p>I'm trying to cast a base class object to a derived class object with <code>dynamic_cast</code>, but <code>dynamic_cast</code> returns null. Is it possible to downcast using <code>dynamic_cast</code>?</p>
  
  <pre><code>struct A {
    virtual ~A() {}
  };
  
  struct B : A {};
  
  
  int main()
  {
      A* a = new A();
  
      B* b = dynamic_cast&lt;B*&gt;(a);
      if(b){
        std::cout &lt;&lt; "b has value" &lt;&lt; std::endl;
      }else{
        std::cout &lt;&lt; "no value" &lt;&lt; std::endl;
      }
  }  
  </code></pre>
  
  <p>This code prints out "no value".</p>