lookup fields struct

mimi 4.deniz.z.z at gmail.com
Sun May 26 07:19:12 PDT 2013


Hi!

I am want to get list of fields types and offsets in struct by
the template.

I.e., lookup through this struct:

struct S {

int a;
string b;
someptr* c;

};

template Lookup!( S )(); returns something as:

field #0, int, offset 0
field #1, string, offset 8,
field #2, someptr, offset 16

How I can do this?


More information about the Digitalmars-d-learn mailing list