BlackEdder:

Is this possible at all?

I think it's possible, as long as your associative array contents are known at compile-time. You can write a function that given the associative array returns a string that mixed-in defines the struct. And then you can define a toStruct template.

Bye,
bearophile

Reply via email to