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

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -