Random D geekout

Jacob Carlborg doob at me.com
Sat Apr 21 08:39:43 PDT 2012


On 2012-04-20 20:50, Arne wrote:

> auto dgs =
> [
> "name": (string value) {d.name = value; },
> "phone": (string value) => cast(void)(d.phone = value),
> "age": (string value) => cast(void)(d.age = value.to!int()),
> ];
>
> This works... is there a better way, to avoid cast?

You could try explicitly declare the type of "dgs" and see if that helps.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list