delegate bug?

Manfred Nowak svv1999 at hotmail.com
Fri Nov 9 07:05:03 PST 2012


Jack Applegame wrote:

>    dg.ptr = cast(void*)b;

This changes the environment only. It does not change the function 
called on the``dg()'-request---and the function called does not depend 
on the environment.

But including a dependence on the environment may not change the 
output, because the compiler may instruct the executable to memoize the 
output.

Hint: casting is equivalent to exclaiming: "I know what I am doing. 
Therefore: shut up compiler!"

.manfred



More information about the Digitalmars-d-learn mailing list