On 12/10/2011 3:25 AM, kenji hara wrote:

You can use s is S.init for bitwise comparison.


That gives me the same results as using ==. I ended up working around my immediate problem in Plot2kill by using memcmp, but in general this behavior needs to be better specified.

I was not even aware that `is` was defined for anything other than pointers/class references before this conversation. As you implicitly suggested, I think `is` should be defined for all types and should mean "guaranteed to return true iff lhs is bitwise identical to rhs. Will not dereference pointers, will not call opEquals, will not return false because of NaNs".

Also, the behavior of == _must_ be consistent on 32- and 64-bit. Since I know this definitely is a bug, I'll file a report for it.
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta

Reply via email to