Define an order for allMembers traits

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Wed Aug 23 12:42:25 UTC 2023


Another way to do this (which should be defined):

```d
void main() {
     S s;

     static foreach(f; s.tupleof) {
         pragma(msg, __traits(identifier, f));
     }
}

struct S {
    int a, b;

     union {
         string c, d;
     }
}
```


More information about the Digitalmars-d mailing list