On Wednesday, 16 July 2014 at 17:43:03 UTC, Klb wrote:
auto names = __traits(allMembers, S);
Error: static variable _names_field_0 cannot be read at compile time.
The problem there is names is a regular runtime variable and mixins need to use compile time stuff. If you make that enum instead of auto, it'll probably work.
