Is it possible to automatically convert an associative array to a
struct?

Basically I want to do the following (for any struct).

struct A {
    double x = 1;
}

double[string] aa = ["x":1];

auto a = toStruct!A( aa );

I've been trying to do this at compile time, but can't work out
how setMembers and or loop over the associative array at compile
time.

Is this possible at all?

Reply via email to