toHash /opCmp for builtin-types

Daniel Gibson metalcaedes at gmail.com
Mon Feb 21 12:57:09 PST 2011


Am 21.02.2011 21:55, schrieb Simon Buerger:
>> sadly no: (-3000000000) - (3000000000) = -170532704 which is
>> incorrect. It does however work for short/byte (and opCmp still
>> returning int).
>
> oops, wrong example. It is: (-2000000000) - (2000000000) = 294967296,
> sry. Anyway, you see the point with overflows

Hm yes, you're right :-)


More information about the Digitalmars-d mailing list