title: template specialization : does not match any template declaration
body: <p>When I study the template specialization, I use a very simple example, but I still got error.</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  template &lt;class T&gt;
  class chrrr{
      public:
      T chgchr(T c);  
  };
  
  template &lt; class T&gt; 
  T chrrr&lt;T&gt;::chgchr(T c){
      return c+1; 
  }
  
  template &lt;&gt;
  class chrrr&lt;char&gt;{
      public:
      char chgchr(char c);    
  };
  template &lt;&gt;
  char chrrr&lt;char&gt;::chgchr(char c){
      return c+2; 
  }
  
  
  
  using namespace std;
  
  int main(){
      char a='a';
      int i=1;
  
      chrrr&lt;int&gt; it;
      chrrr&lt;char&gt; ch;
      cout&lt;&lt;ch.chgchr(a)&lt;&lt;endl;
      cout&lt;&lt;it.chgchr(i)&lt;&lt;endl;
  
      return 0;
  }
  </code></pre>
  
  <p>The error said:</p>
  
  <pre><code>line 20: error: template-id ‘chgchr&lt;&gt;’ for ‘char chrrr&lt;char&gt;::chgchr(char)’ does not match any template declaration
  </code></pre>
  
  <p>I wonder why it dose not match? And if I define chgchr in class definition body rather than out side, it works very well.</p>