I get a string from HTTP request and I need to process a member of this name of an object. I would like to use __traits(getMember) for that, but of course it doesn't work with runtime parameters. So what I ended up with is:
foreach( s; __traits(derivedMembers, typeof(obj))) { if (s == name) ... } Of course this looks suboptimal as I run the loop until I find a member matching the name. Is there any better way to do this? -- Marek Janukowicz