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.