title: Template methods in a DLL class C++
body: <p>I'm implementing a DLL in C++ and in my library I have a class which contains a template method. 
  For example </p>
  
  <pre><code>class A : public IA
  {
  public: 
   A() { /* constructor stuff */ }
   template &lt;typename T&gt; void foo { /* foo does stuff */ }
  };
  </code></pre>
  
  <p>Now, since templates are resolved at compilation time, if I <strong>never</strong> invoke <em>foo</em> in my library but it's meant to be invoked <strong>only</strong> in the project that uses the library, what happens? 
  From my understanding, when I compile the DLL, foo won't be saved in the virtual method table with any type, thus, the invokation in the target project may cause some kind of unexpected behavior. Can anyone confirm this and explain it in more details ? Thanks </p>