http://d.puremagic.com/issues/show_bug.cgi?id=3433
--- Comment #4 from Steven Schveighoffer <schvei...@yahoo.com> 2009-10-21 14:15:28 PDT --- the default opEquals on a struct that contains only an integer member does a bitwise comparison. You may interpret this as "it does this because this is how you compare integers" or you may interpret this as "it does this because the default opEquals for structs always does bit comparison." I think according to the spec, the latter is the case, which is consistent with the given behavior. In that case, I think this should be marked as an enhancement, I don't think it would be a trivial update. I would mark it as such, but I don't want to step on toes... Incidentally, it would be a nice enhancement because it would save a lot of boiler-plate code. (In reply to comment #3) > Well bitwise comparison breaks encapsulation. If a type defines its own > equality operator, it most definitely had its reason. Skipping that is > ignoring > the encapsulation attempted by the object. I agree, if you want bitwise comparison, use 'is'. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------