How get struct value by member name string ?

Adam D Ruppe destructionator at gmail.com
Mon May 29 11:21:11 UTC 2023


On Monday, 29 May 2023 at 09:35:11 UTC, John Xu wrote:
>     Error: variable `column` cannot be read at compile time

you should generally getMember on a variable

T t;
__traits(getMember, t, "name")

like that, that's as if you wrote t.name


More information about the Digitalmars-d-learn mailing list