How to get instance member value from getSymbolsByUDA

Remi Thebault remi.thebault at gmail.com
Sat Feb 26 17:06:06 UTC 2022


On Saturday, 26 February 2022 at 12:01:14 UTC, max haughton wrote:
>
> Getting the UDAs from inside a symbol must be done via a 
> recursive procedure in the same manner one would identify the 
> aforementioned symbol i.e. you have to go through the fields 
> looking for UDAs *then* use getUDAs.
>
> This is because UDAs cannot convey information without their 
> context, so the trait doesn't look recursively.

I don't need to get access to the UDA value, I need the value of 
the field decorated with UDA.
Finally I can get access to the member using `__traits(getMember, 
req, paramSymbols[0].stringof)`.


More information about the Digitalmars-d-learn mailing list