On 07/30/2016 07:00 AM, 岩倉 澪 wrote:
auto mem = malloc(2^^31);
2^^31 is negative. 2^^31-1 is the maximum positive value of an int, so 2^^31 wraps around to int.min.
Try 2u^^31.
ag0aep6g via Digitalmars-d-learn Fri, 29 Jul 2016 22:26:09 -0700
On 07/30/2016 07:00 AM, 岩倉 澪 wrote:
auto mem = malloc(2^^31);
2^^31 is negative. 2^^31-1 is the maximum positive value of an int, so 2^^31 wraps around to int.min.
Try 2u^^31.