casting - How could I cast a type stored in a string to a type at runtime on dlang? -
i want deserialize variable , have stored type in string this:
int var = 60; auto type = typeid(int).tostring; writeln(type); //prints "int"
but now, when have deserialize it, can not cast string real type required @ compile time. make table , store alias types or build big switch block every type, annoying. have suggestion?
Comments
Post a Comment