Struct fields and properties as alias members
Ben Jones
fake at fake.fake
Wed Dec 8 18:07:32 UTC 2021
On Wednesday, 8 December 2021 at 17:44:47 UTC, Adam D Ruppe wrote:
> On Wednesday, 8 December 2021 at 17:19:32 UTC, Ben Jones wrote:
Gotcha, thanks. I tried using `S.field` before and that didn't
work, `__traits(child)` was the key.
Since I reuse the field a few times I tried to alias the result:
`alias theProp = __traits(child, s, field);`
But everywhere I use `theProp` I get the same error as before
(need this...). Is there a way to avoid using the full
`__traits(child)` expression everywhere?
More information about the Digitalmars-d-learn
mailing list