Making alias of a struct field needs "this".

realhet real_het at hotmail.com
Tue Jun 2 14:57:06 UTC 2020


On Tuesday, 2 June 2020 at 13:37:25 UTC, Stanislav Blinov wrote:
> On Tuesday, 2 June 2020 at 09:28:01 UTC, realhet wrote:
> Try UDAs instead of a map:
>
> struct A {
>     struct G {
>         @("hauteur") int height;
>     }

Good idea, thx! I already using UDA's for range and measurement 
units.

   struct Profile{ @STORED:
     @UNIT("mm")     @RANGE(0, 100)  float radius = 21;

I gonna need one more reasonably named UDA struct.


More information about the Digitalmars-d-learn mailing list