I have only TypeInfo taken dynamically from an arbitrary type, and I need to initialize the Variant variable to the default value for this type. How can I do that?

I tried this:

TypeInfo ti = typeid(int);
Variant v = ti.initializer;

But after,

int o = v.get!int;

and

int o = v.coerce!int;

doesn't work.


Reply via email to