On Thursday, 25 February 2016 at 04:25:25 UTC, Nicholas Wilson wrote:
foreach(m; __traits(allMembers, ...)
{
    static if(is(m== enum))
}


That's close but not quite there... try

static if(is(typeof(__traits(getMember, Item, m)) == enum))

for member variables, or if you are looking at a type itself youcan leave off the typeof() bit.

Reply via email to