How to get only the field name from an alias?

Elfstone elfstone at yeah.net
Tue Feb 21 04:02:11 UTC 2023


On Tuesday, 21 February 2023 at 03:13:38 UTC, ryuukk_ wrote:
> I'm not sure what the solution is for your specific question, 
> but there is some alternative way you could do: (no longer need 
> function on your struct)
>
> [...]

This is super neat, but the order of the fields will have to be 
frozen, and I won't be able to do something like this:

     sz.processField!hasData();
     if (this.hasData)
     {
         sz.processField!data();
     }

Unless I can mark versions and dependencies with attributes and 
analyse them somehow.

The Deserializer shares the same interface by the way.


More information about the Digitalmars-d-learn mailing list