Comment #1 by nikolay.v.belov — 2013-09-05T23:52:33Z
Sorry. It is hasty fix.
Real problem - it is
size_t mask = (1 << n) - 1;
On 64 bit system size_t has 64 bits.
Byt 1 on this expression it is not size_t, it it 32 bit integer.
And (1 << 32) return 0;
Good fix is
size_t mask = (cast(size_t)1 << n) - 1;
I see this problem on other methods:
- opCmp:
size_t mask = cast(size_t)(1 << j);
must be replaced by
size_t mask = (cast(size_t)1 << j);
Comment #2 by andrej.mitrovich — 2014-04-24T19:34:54Z
Tagging as x86_64. Can we get a pull request for this? It would be very welcome!