Sebastian Graf:
I wonder if there is a good way to dry up this:

I suggest to improve that code a lot.

For machineWord there is:

alias machineWord = Select!(machine == Machine.I386, uint, ulong);


This:
(1 << 32)

Gives:
Error: shift by 32 is outside the range 0..31

Generally it's better to use named enums and final switches, where possible.

Keep in mind built-in integral numbers have the max attribute.

Bye,
bearophile

Reply via email to