Add
mask = (1 << 18) - 1
to the end of the enum, and you're done! Or better mask [[maybe_unused]] = (1 << 18) - 1
.