[Issue 18290] std.conv.parse throws ConvOverflowException for negative values in hex
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Oct 21 13:40:24 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18290
Tiberiu Lepadatu <tiberiulepadatu14 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tiberiulepadatu14 at gmail.com
--- Comment #1 from Tiberiu Lepadatu <tiberiulepadatu14 at gmail.com> ---
(In reply to Răzvan Ștefănescu from comment #0)
> string input = "80000000";
> auto x = parse!int(input, 16);
> //ConvOverflowException
I feel that this is not a bug. To show that you
are using a hex string you must use "0x" in front.
If you write "0x80000000" instead of "80000000"
there is no bug.
--
More information about the Digitalmars-d-bugs
mailing list