On 2012-03-22 02:23, Tove wrote:
mixin(attr(q{struct Foo { @NonSerialized int x; @NonSerialized int y; int z; }}));void main() { auto m = [ __traits(allMembers, Foo) ]; writeln("Normal members of Foo:", m); auto n = [ __traits(allMembers, Foo_Serializable) ]; writeln("Serializable members of Foo:", n); }
Just really ugly and it creates a new type, completely unnecessary if D supported user defined attributes.
-- /Jacob Carlborg