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 -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -