checkedint call removal

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 31 01:00:14 PDT 2014


"H. S. Teoh via Digitalmars-d"  wrote in message 
news:mailman.255.1406747871.16021.digitalmars-d at puremagic.com...

> Wait, what? I thought the whole point of enforce is that it will *not*
> be removed by the compiler, no matter what?

No, the compiler is free to remove it if it can prove it will never be 
triggered.  eg if the condition is checking a ubyte < 1000.  If the assert 
in that example is never false, then the enforce is dead code. 



More information about the Digitalmars-d mailing list