[Issue 10555] enumerator can no longer increment beyond maximum of initializer

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 31 04:23:53 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10555



--- Comment #4 from Henning Pohl <henning at still-hidden.de> 2013-08-31 04:23:52 PDT ---
Keep in mind that you can always cast to the base type:

enum A // int
{
    A0
}

template BaseType(E)
{
    static if (is(E e == enum))
    {
        alias BaseType = e;
    }
    else
    {
        static assert("not an enum");
    }
}

enum B // int
{
    B0 = cast(BaseType!A)A.A0,
    B1
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list