Error: template std.conv.parse cannot deduce function from argument types
Ralph Doncaster
nerdralph at github.com
Tue Feb 6 18:28:27 UTC 2018
On Tuesday, 6 February 2018 at 17:47:30 UTC, Adam D. Ruppe wrote:
> On Tuesday, 6 February 2018 at 17:33:43 UTC, Ralph Doncaster
> wrote:
>> I get this error when I try the following code:
>
> parse specifically works with a reference input it can advance.
> From the docs:
>
> "It takes the input by reference. (This means that rvalues -
> such as string literals - are not accepted: use to instead.)
> It advances the input to the position following the conversion."
>
>> I think the template overloading for parse is getting confused
>> because it sees the lvalue r.l as being of type union rather
>> than ulong.
>
> The left hand side of an assignment never plays a role in
> overloading, so you can disregard that. It is just a string
> literal cannot be advanced and thus does not work with parse.
Thanks! Got it.
More information about the Digitalmars-d-learn
mailing list