C++ template overloading query [closed]
I have seen an interesting question here: http://www.codeguru.com/forum/archive/index.php/t-466357.html
Here is the report:
template<class T, class C> void foo(T op1, C op2) {}; //line 1
template<class C, class T> void foo(C op1, T op2) {}; //line 2
template<class T, class C> void foo(C op1, T op2) {}; //line 3
Q> When the above code is compiled, which line will give an error, and why.
精彩评论