std.conv.parse not accepting ByCodeUnitImpl
ag0aep6g via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon May 23 22:01:39 PDT 2016
On 05/24/2016 03:59 AM, Jack Stouffer wrote:
> parse!int(splitValue.front);
[...]
> std.conv.parse(Target, Source)(ref Source s) if (
> isSomeChar!(ElementType!Source) && isIntegral!Target && !is(Target
> == enum))
You're missing that `parse`'s parameter is `ref`. `splitValue.front` is
not an lvalue, so it can't be passed in a ref parameter.
This works:
----
auto f = splitValue.front;
parse!int(f);
----
More information about the Digitalmars-d-learn
mailing list