[Issue 15419] std.conv.parse() does not accept string literals
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Dec 7 17:54:15 PST 2015
https://issues.dlang.org/show_bug.cgi?id=15419
yebblies <yebblies at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yebblies at gmail.com
Hardware|x86_64 |All
OS|Linux |All
Severity|trivial |enhancement
--- Comment #1 from yebblies <yebblies at gmail.com> ---
>From the description of parse:
'takes the input by reference and advances it to the position following the
conversion'
This is intentional API design, and therefore not a bug.
The compiler used to be very sloppy about what it accepted as an lvalue, so
those test cases did work at one point.
The workaround is just to use 'to' instead of 'parse', which takes an rvalue
argument.
--
More information about the Digitalmars-d-bugs
mailing list