Struct initializer in UDA

realhet real_het at
Sat Sep 26 16:05:58 UTC 2020


   struct S{int a, b, c=9, d, e, f;}

Is there a way or a trick to declare an UDA by using a nice 
struct initializer?

It would be nice to be able to use the form:

   @S{f:42} int a;  //or something similar to this.

instead of this longer and error-prone way:

   @S(0, 0, 0, 9, 0, 42) int a;

More information about the Digitalmars-d-learn mailing list