possible bug in std.conv.parse

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 26 17:00:29 PDT 2014


On 4/26/14, 4:36 PM, 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.
>
> the question is: is it bug, or it's intended behavior to limit signed
> integrals to values which can be safely abs()ed?

Bug. -- Andrei


More information about the Digitalmars-d mailing list