1 // The default enum base type is ubyte to not bloat structs (better for cache use).
 2 enum MODE : int {
 3     FAST,
 4     DEEP,
 5     ADAPTIVE,
 6 }
 7 
 8 int main()
 9 {
10     auto m = MODE.DEEP;
11 
12     // A switch on enum must be exhaustive of course.
13     switch (m) {
14         case MODE.FAST:
15             break;  // empty case falls through by default – use break to avoid
16         case MODE.DEEP:
17             int a = 1234;
18             goto;   // fall through
19         case MODE.ADAPTIVE:
20             // do something
21     }
22 
23     return 0;
24 }