bool concat patternmatching with switch

Dennis dkorpel at gmail.com
Wed May 29 20:24:30 UTC 2024


On Wednesday, 29 May 2024 at 18:41:46 UTC, monkyyy wrote:
> I really dont understand the compilers code, is `X` exposed to 
> a user ever?

It's just a normal function, defined right above the switch 
statement:

```D
static int X(int fty, int tty) { return fty * TMAX + tty; }
```

It combines the two switch variables into a single one with a 
multiply, the same as your bitshift idea, which is a 
multiplication by a power of 2.


More information about the dip.ideas mailing list