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


Andrej Mitrovic <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #3 from Andrej Mitrovic <[email protected]> 2012-05-01 
15:39:37 PDT ---
(In reply to comment #2)
> (In reply to comment #0)
> 
> Dupe of Issue 4997 ?

Yeah, I'll close this then.

> This is enough, no need to create an array:
> 
> template EnumLength(E) if (is(E == enum))
> {
>     enum EnumLength = __traits(allMembers, E).length;
> }

Thanks, I forgot tuples have length.

> But your problem is probably solved in another way, creating an "enum
> duplicator".

Well in my real code the "subtyped" enum has different field names but the same
values as another enum. Anyway it's not an issue as long as I can get the
length of the enum.

*** This issue has been marked as a duplicate of issue 4997 ***

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

Reply via email to