In the following code: Variant j; j = 1.0; // make it a doubleauto x = cast(float)(j.get!(double)); // fail: cannot cast j.get!(double)
auto y = cast(float)x; // fine
The first attempt to cast doesn't compile, but the second less-direct cast is OK. Is that a bit strange?