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



--- Comment #4 from [email protected] 2012-12-02 10:34:49 PST ---
(In reply to comment #2)

> We could instead provide a template in std.traits:
> 
> template EnumLength(E) if (is(E == enum))
> {
>     enum size_t EnumLength = EnumMembers!E.length;
> }
> 
> void main()
> {
>     assert(EnumLength!Foo == 1);
> }

I think this gives too much little improvement :-) Such EnumLength template is
not needed in Phobos.

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

Reply via email to