On 2016-09-04 14:36, Andrei Alexandrescu wrote:

Yah, .tupleof is great to have. I think that should be enough for most
introspection needs. Only the field names are missing, can those be
accessed somehow? -- Andrei

Yes:

module foo;

struct Foo
{
    private int a;
}

module main;

import foo;
static assert(__traits(identifier, Foo.tupleof[0]) == "a");

--
/Jacob Carlborg

Reply via email to