title: Order of template arguments for a function
body: <p>In below code among 2 template arguments, I use one of them implicit and another explicitly:</p>
  
  <pre><code>class A {};
  
  template&lt;typename ToType, typename FromType&gt;
  ToType CompileTimeCast (FromType pointer)
  {
    return (ToType)(pointer);
  }
  
  int main ()
  {
    A *pA;
    int *pi = CompileTimeCast&lt;int*&gt;(pA); // function invocation
  }
  </code></pre>
  
  <p>It works fine. Now, if I swap <code>ToType</code> and <code>FromType</code> in argument list, compiler throws error as:</p>
  
  <pre><code> error: no matching function for call to ‘CompileTimeCast(A*&amp;)’
  </code></pre>
  
  <p>Was curious to know, why compiler complains when it knows that both arguments are different at function invocation and one argument is already used ?</p>