On Sun, Aug 5, 2012 at 5:40 AM, cal <callumena...@gmail.com> wrote: > In the following code: > > Variant j; > j = 1.0; // make it a double > auto x = cast(float)(j.get!(double)); // fail: cannot cast j.get!(double) > auto y = cast(float)x; // fine
I think it's a property-like problem: you need () after .get!() I had this problem a few days ago. Variant j; j = 1.0; // make it a double auto x = cast(float)(j.get!(double)()); // fine auto y = cast(float)x; // fine