|
-
June 30th, 2010, 12:57 PM
#2
Re: Strange function overloading behavior with int and enum
I have to admit when I first read this I thought you were smoking crack. Obviously the solution to your example is an Explicit cast, but I get your point. I have absolutly no idea why it behaves this way. I even modified the enum and assigned different values 10,20,30 so that there was no 0 "Bar" value and it still calls the Foo(Bar a) when 0 is used as a argument.
Long and short of it, pretty darn interesting, I bet that was a b-word to debug.
Last edited by [email protected]; June 30th, 2010 at 01:02 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
|