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



--- Comment #6 from Don <clugd...@yahoo.com.au> 2010-01-28 11:09:25 PST ---
Actually, there's nothing at all wrong with __traits(getMember).
Really, you are asking for static foreach: given a compile-time constant array,
iterate over each of its members.
Since static foreach is unfortunately not going to happen (it was on Andrei's
list, but Walter rejected it), the other possibilities are to make
__traits(allMembers) into a tuple, or to use the static foreach workaround:

Something like:

enum a = __traits(allMembers, ...)'
foreach(T, int indx; ForEachTuple!(a.length))
{
   a = __traits(getMember, a[indx]);
}

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

Reply via email to