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 -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -

What is happening when Matlab is starting a "parallel pool"? -