enumerating member offsetofs via foreach over members-tuple

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Fri Nov 14 14:47:13 PST 2008


Denis Koroskin wrote:
> Am I doing something wrong?

As was mentioned, 'm' is just a local variable once inside the loop. 
This works though:
-----
foreach (i, m; this.tupleof) {
     writefln(this.tupleof[i].offsetof);
}
-----



More information about the Digitalmars-d mailing list