Nitpick: uniform initialization now allows:
```D
size_t mask = (size_t(1) << n) - 1;
```
I think it reads better.