Re: offsetof + foreach

2012-09-08 Thread Kenji Hara
On Friday, 7 September 2012 at 17:32:43 UTC, Ellery Newcomer wrote: On 09/07/2012 10:31 AM, Ellery Newcomer wrote: I have a struct buffer, and I want to print out its members' offsetof. This: foreach(i,_t; buffer.tupleof) { writefln(%s@: %s, _t.stringof, _t.offsetof); }

offsetof + foreach

2012-09-07 Thread Ellery Newcomer
I have a struct buffer, and I want to print out its members' offsetof. This: foreach(i,_t; buffer.tupleof) { writefln(%s@: %s, _t.stringof, _t.offsetof); } complains Error: undefined identifier 'offsetof' what should I be doing?

Re: offsetof + foreach

2012-09-07 Thread Ellery Newcomer
On 09/07/2012 10:31 AM, Ellery Newcomer wrote: I have a struct buffer, and I want to print out its members' offsetof. This: foreach(i,_t; buffer.tupleof) { writefln(%s@: %s, _t.stringof, _t.offsetof); } complains Error: undefined identifier 'offsetof' what should I be