title: C++ template overloading query
body: <p>I have seen an interesting question here: <a href="http://www.codeguru.com/forum/archive/index.php/t-466357.html" rel="nofollow">http://www.codeguru.com/forum/archive/index.php/t-466357.html</a></p>
  
  <p>Here is the report:</p>
  
  <pre><code>template&lt;class T, class C&gt; void foo(T op1, C op2) {}; //line 1
  template&lt;class C, class T&gt; void foo(C op1, T op2) {}; //line 2
  template&lt;class T, class C&gt; void foo(C op1, T op2) {}; //line 3
  </code></pre>
  
  <p>Q> When the above code is compiled, which line will give an error, and why.</p>