title: Template specialization of a single method from templated class with multiple template parameters
body: <p>I'm basically trying to do what was discussed in <a href="https://stackoverflow.com/questions/1723537/template-specialization-of-a-single-method-from-a-templated-class">Template specialization of a single method from a templated class</a> except that my TClass has multiple template Parameters like this:</p>
  
  <pre><code>template &lt; class KEY, class TYPE &gt;
  class TClass
  {
  public:
      :
      void doSomething(KEY * v);
      :
  };
  
  template &lt; class KEY, class TYPE &gt;
  void TClass&lt;KEY, TYPE&gt;::doSomething(KEY * v) 
  {
      // do something
  }
  </code></pre>
  
  <p>This works so far, but how do I define a specialized implementation for one template Parameter? I tried adding this:</p>
  
  <pre><code>template &lt; class TYPE &gt;
  void TClass&lt;int, TYPE&gt;::doSomething(int * v)
  {
      // do something if KEY is int
  }
  </code></pre>
  
  <p>but the Compiler complains about "unable to match function Definition to an existing declaration" (VC2010) for that method/function.</p>
  
  <p>As a sidenote: If I specialize both template Parameters at the same time, it works:</p>
  
  <pre><code>template &lt; &gt;
  void TClass&lt;int, char&gt;::doSomething(int * v)
  {
      // do something if KEY is int and TYPE is char
  }
  </code></pre>
  
  <p>but that's not what I want to do.</p>
  
  <p>Any suggestions?</p>