开发者

C++ template overloading query [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_开发问答 Closed 11 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜