title: Out-of-Line Virtual Method
body: <p>What exactly is a <em>out-of-line virtual method</em> and why does it affect link times?</p>
  
  <p><a href="http://llvm.org/docs/CodingStandards.html#provide-a-virtual-method-anchor-for-classes-in-headers" rel="noreferrer">LLVM Coding Standards</a> says</p>
  
  <blockquote>
    <p>If a class is defined in a header file and has a vtable (either it has
    virtual methods or it derives from classes with virtual methods), it
    must always have at least one out-of-line virtual method in the class.
    Without this, the compiler will copy the vtable and RTTI into every .o
    file that #includes the header, bloating .o file sizes and increasing
    link times.</p>
  </blockquote>