Allocators

Andrej Mitrovic andrej.mitrovich at gmail.com
Fri Aug 23 17:16:03 PDT 2013


On 8/24/13, Peter Alexander <peter.alexander.au at gmail.com> wrote:
> The immutable int is changed

Yeah.

> and apparently the same address has
> two different values at the same time!

Apparently, but it's not what happens. The compiler optimizes the call
to writeln by substituting 'i' with its value. This would be a safe
optimization based on immutability rules, were it not for the postblit
bug.


More information about the Digitalmars-d mailing list