enum detection

Jack Applegame japplegame at gmail.com
Thu Nov 22 07:10:07 PST 2012


How to detect enum member?

struct A {
   enum id = 10;
   int b;
   char c;
}
foreach(ident; __traits(allMembers, A)) {
   // is ident enum or not?
}



More information about the Digitalmars-d-learn mailing list