tell if __traits(allMembers, ... ) is an enum (not manifest constant)

Nicholas Wilson via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Feb 24 20:25:25 PST 2016


there is no __traits(isEnum, ...)

I've tried
foreach(m; __traits(allMembers, ...)
{
     static if (__traits(compiles,EnumMembers!(m)))
     static if (EnumMembers!(m).length)
     static if(is(m== enum))
}

I can detect static functions with __traits(isStaticFunction, ...)


More information about the Digitalmars-d-learn mailing list