DIP1044---"Enum Type Inference"---Formal Assessment

Walter Bright newshound2 at digitalmars.com
Thu Apr 27 00:16:10 UTC 2023


This also works:

     alias F = MySuperLongNameFlag;

     auto flag = F.A | F.B | F.C | F.D;
     set_flags(F.A | F.B | F.C | F.D);

It's similar to setting a local variable to some complex expression, just so you 
don't have to repeat that expression multiple times.


More information about the Digitalmars-d-announce mailing list