title: Is there any penalty/cost of virtual inheritance in C++, when calling non-virtual base method?
body: <p>Does using virtual inheritance in C++ have a runtime penalty in compiled code, when we call a <em>regular function</em> member from its base class? Sample code:</p>
  
  <pre><code>class A {
      public:
          void foo(void) {}
  };
  class B : virtual public A {};
  class C : virtual public A {};
  class D : public B, public C {};
  
  // ...
  
  D bar;
  bar.foo ();
  </code></pre>