toHash /opCmp for builtin-types

Simon Buerger krox at gmx.net
Mon Feb 21 12:55:24 PST 2011


> 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


More information about the Digitalmars-d mailing list