|
-
June 30th, 2010, 02:51 PM
#4
Re: Strange function overloading behavior with int and enum
 Originally Posted by BigEd781
enum derives implicitly from int, so of course the int version will be called instead of the object version because it is more restrictive.
I can argue why it would call foo(Bar) or foo(object) with equal enthusiasm, but what does not make any sense is why It calls foo(bar) when the calling foo(0) and then calls foo(object) with foo(1)
Last edited by [email protected]; June 30th, 2010 at 03:13 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|