Allow Conditional Compilation Inside Enum Declaration

HuskyNator huskynator at protonmail.ch
Fri Oct 11 17:17:45 UTC 2024


Another use case I ran into was stuff like:

```d
enum MouseButton: ubyte {
     static foreach(i; 1..9)
         mixin("mouse_"~i.stringof~",");
     mouse_left = mouse_1,
     mouse_right = mouse_2,
     mouse_middle = mouse_3;
}
```
Though it might make more sense specifically for conditional 
compilation like `version(..)`.


More information about the dip.ideas mailing list