possible bug in std.conv.parse
Adam D. Ruppe via Digitalmars-d
digitalmars-d at puremagic.com
Sat Apr 26 16:43:09 PDT 2014
On Saturday, 26 April 2014 at 23:36:28 UTC, ketmar wrote:
> this code: std.conv.parse!byte("-128") throws error: "Overflow
> in integral conversion". but this is obviously not true, as
> signed byte can hold such value.
Check your math... the most negative number a signed byte can
hold is -127. The most positive number it can hold is 128, but
negating that wouldn't fit in eight bits.
More information about the Digitalmars-d
mailing list