title: Template specialization of a single method from a templated class
body: <p>Always considering that the following header, containing my templated class, is included in at least two <code>.CPP</code> files, this code compiles correctly:</p>
  
  <pre><code>template &lt;class T&gt;
  class TClass 
  {
  public:
    void doSomething(std::vector&lt;T&gt; * v);
  };
  
  template &lt;class T&gt;
  void TClass&lt;T&gt;::doSomething(std::vector&lt;T&gt; * v) {
    // Do something with a vector of a generic T
  }
  
  template &lt;&gt;
  inline void TClass&lt;int&gt;::doSomething(std::vector&lt;int&gt; * v) {
    // Do something with a vector of int's
  }
  </code></pre>
  
  <p>But note the inline in the specialization method. It is required to avoid a linker error (in VS2008 is LNK2005) due to the method being defined more then once. I understand this because AFAIK a full template specialization is the same as a simple method definition.</p>
  
  <p>So, how do I remove that <code>inline</code>? The code should not be duplicated in every use of it. I've searched Google, read some questions here in SO and tried many of the suggested solutions but none successfully built (at least not in VS 2008).</p>
  
  <p>Thanks!</p>