How to implement this?

Elvis nospam at pureworld.com
Mon Jun 10 02:42:55 PDT 2013


class A
{
     enum TypeID = 1;
}
class B : A
{
     enum TypeID = 2;
}

class C : A
{
     enum TypeID = 3;
}

class D : B
{
     enum TypeID = 4;
}

...


Could anybody shed some light on how to make these TypeIDs auto 
increment at compile time?




More information about the Digitalmars-d-learn mailing list