title: "too many template-parameter-lists" error when specializing a member function
body: <p>I would like to define some template member methods inside a template class like so:</p>
  
  <pre><code>template &lt;typename T&gt;
  class CallSometing {
  public:
      void call (T tObj);  // 1st 
  
      template &lt;typename A&gt;
      void call (T tObj, A aObj); // 2nd 
  
      template &lt;typename A&gt;
      template &lt;typename B&gt;
  void call (T tObj, A aObj, B bObj); // 3rd
  
  };
  
  
  template &lt;typename T&gt; void
  CallSometing&lt;T&gt;::call (T tObj) {
      std::cout &lt;&lt; tObj &lt;&lt; ", " &lt;&lt; std::endl;
  }
  
  template &lt;typename T&gt;
  template &lt;typename A&gt; void
  CallSometing&lt;T&gt;::call (T tObj, A aObj) {
      std::cout &lt;&lt; tObj &lt;&lt; ", " &lt;&lt; aObj &lt;&lt; std::endl;
  }
  
  
  template &lt;typename T&gt;
  template &lt;typename A&gt;
  template &lt;typename B&gt; void
  CallSometing&lt;T&gt;::call (T tObj, A aObj, B bObj) {
      std::cout &lt;&lt; tObj &lt;&lt; ", " &lt;&lt; aObj &lt;&lt; ", " &lt;&lt; bObj &lt;&lt; ", " &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>But when instantializing the template class, there is an error concerning the three-argument menthod definition:</p>
  
  <pre><code>CallSometing&lt;int&gt; caller;
  
  caller.call(12);  // OK
  caller.call(12, 13.0); // OK
  caller.call (12, 13.0, std::string("lalala!")); // NOK - complains "error: too many template-parameter-lists"
  </code></pre>
  
  <p>Could you please point what I am doing wrong? Why the (2nd) method is OK but the (3rd) causes a compile time error?</p>