On 2011-04-25 18:47, Andrej Mitrovic wrote:
Good idea. .tupleof seems to avoid collecting functions which is
perfect. Here's a quick implementation:

http://codepad.org/lSDTFd7E

The only issue I have left is that the function that prints the code
doesn't really know what the variable was named in the calling code.

I'm not sure I understand but do you want to print "properties" in this case?

As an alternative I could pass "myvar.stringof" and it would print its
name before all field names instead of the type name.

Btw, it seems CTFE doesn't work with this syntax:
foreach (index; 0..100)

But it does work with this syntax:
foreach (index, value; values)


--
/Jacob Carlborg

Reply via email to