title: Is it possible to know the number of inheritances from a c++ class declaration at runtime?
body: <p>Given these class examples,</p>
  
  <pre><code>class A {};
  class B : A {};
  class C {};
  class D : A, C {};
  class E : D {};
  </code></pre>
  
  <p>The function should return the number of inheritances of class A as 0 whereas for classes B, C, D and E this function should return 1, 0, 2, 1 respectively. </p>
  
  <blockquote>
    <p>Note: The function shouldn't take account the whole inherited
    classes (for example, E takes D that is inherited from A and C
    indirectly, so it would has 3 but in my case I want to know the number
    of inheritances of the class in its declaration)</p>
  </blockquote>