On 2013-01-06 18:29, Philippe Sigaud wrote:
You can use a string mixin:class Foo { int a; @(3) private int b; } void main() { writeln(mixin("__traits(getAttributes, " ~ Foo.tupleof[1].stringof ~ ")")); // -> 3 }
Good thinking. It's not pretty but it works. Thanks. -- /Jacob Carlborg