BCS schrieb:
http://codepad.org/Eu16XqFu
Thank you very much, it works like a charm.
I wrote a small function to log whatever object I pass to it:
void log(T)(T obj)
{
static if (is(T == struct) || is(T == class))
{
writef("{");
foreach(i,_;obj.tupleof)
writefln("%s : %s,", obj.tupleof[i].stringof[4..$],
obj.tupleof[i]);
writefln("}");
}
else
{
writefln(obj);
}
}
Are there better solutions than this or does it perhaps have any flaws?
