title: no out-of-line virtual method definitions for full-specialized template class
body: <p>I have this kind of structure:</p>
  
  <p><strong>static lib A</strong></p>
  
  <blockquote>
    <p>interface.h</p>
  </blockquote>
  
  <pre><code>class Interface
  {
     public:
     virtual ~Interface() // no pure virtual dtor
  
     virtual void pureMethod1() = 0;
     virtual void pureMethod2() = 0;
  
     virtual void virtualMethod1();
     virtual void virtualMethod2();
  };
  </code></pre>
  
  <blockquote>
    <p>interface.cpp</p>
  </blockquote>
  
  <pre><code>include "interface.h"
  Interface::~Interface() = default;
  Interface::virtualMethod1() {}
  Interface::virtualMethod2() {}
  </code></pre>
  
  <p><strong>static lib B using A</strong></p>
  
  <blockquote>
    <p>BaseT.h</p>
  </blockquote>
  
  <pre><code>#include "interface.h"
  template&lt;class T&gt;
  class BaseT final : public Interface
  {
     static_assert(false, "can't use this specialization");
  };
  </code></pre>
  
  <blockquote>
    <p>specialized1.h</p>
  </blockquote>
  
  <pre><code>#include "baset.h"
  
  using MyType = BaseT&lt;CustomClass1&gt;;
  
  template&lt;&gt;
  class BaseT&lt;CustomClass1&gt; : public Interface
  {
  public:
     BaseT() = default;
  
     void pureMethod1() final {}
     void pureMethod2() final {}
  };
  </code></pre>
  
  <blockquote>
    <p>specialized2.h</p>
  </blockquote>
  
  <pre><code>#include "baset.h"
  
  using MyType = BaseT&lt;CustomClass2&gt;;
  
  template&lt;&gt;
  class BaseT&lt;CustomClass2&gt; : public Interface
  {
  public:
     BaseT() = default;
  
     void pureMethod1() final {}
     void pureMethod2() final {}
  };
  </code></pre>
  
  <p>I'm receiving a warning from clang in both fully specialized classes:</p>
  
  <p><em>warning: 'BaseT has no out-of-line virtual method definition: its vtable will be emitted in every translation unit'</em></p>
  
  <p>Why this warning? I don't have any pure virtual destructor, and a defaulted one is provided in base class. And how I can avoid the out-of-line virtual method since I'm using a template?</p>