On 04/01/12 14:10, Jacob Carlborg wrote: > On 2012-04-01 11:27, Artur Skawina wrote: > >> That's because the compiler won't accept "foreach (i, t; S.tupleof)" and > > But it accepts "foreach (i, t; typeof(S.tupleof))".
It does - thank you. This means that that ugly null-to-pointer cast from my example can go, and all that's needed is: foreach (i, type; typeof(S.tupleof)) { enum name = S.tupleof[i].stringof[4..$]; writef("(%s) %s\n", type.stringof, name); } artur