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



--- Comment #2 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2012-05-01 
15:46:12 PDT ---
What would really help is if you could have properties for types, something
akin to:

@property int length(T)()
    if (is(T == enum))
{
    return __traits(allMembers, T).length;
}

That won't work, but that's the basic idea. Then you could put these functions
into Phobos instead of complicating the language. Of course if the above work
it would also complicate the language, so I dunno..

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

Reply via email to