title: c++ Multiple inheritance and casting
body: <p>I have the following classes :</p>
  
  <pre><code>class A { };
  class B { 
  public:
  B(){}
  virtual ~B(){};
  };
  class B1 : public B{ 
  public:
  B1(){}
  virtual ~B1(){};
  };
  class B2 : public B{ 
  public:
  B2(){}
  virtual ~B2(){};
  };
  class C1 : public A, public B1{ 
  public:
  C1(){}
  virtual ~C1(){};
  };
  class C2 : public A, public B2{ 
  public:
  C2(){}
  virtual ~C2(){};
  };
  </code></pre>
  
  <p>I want to know if an object of type B is also of type A :</p>
  
  <pre><code>  B*b = new C1(); // or new B, or new C2 ...
  
    if(dynamic_cast&lt;A*&gt;(b))
    {
      ...
  </code></pre>
  
  <p>Is my dynamic_cast the correct way do that (it compiles and it runs)?
  Thank you.</p>