assume, assert, enforce, @safe

Daniel Gibson via Digitalmars-d digitalmars-d at puremagic.com
Fri Aug 1 19:18:11 PDT 2014


Am 02.08.2014 04:13, schrieb David Bregman:
>
> is this
> http://www.cplusplus.com/reference/cassert/assert/
>
> the same as this?
> http://msdn.microsoft.com/en-us/library/1b3fsfxw.aspx
>
> can you see the difference now?

Oh, interesting quote from the __assume() link:
"Use __assume in an ASSERT only when the assert is not recoverable. Do 
not use __assume in an assert for which you have subsequent error 
recovery code because the compiler might optimize away the 
error-handling code."

So maybe it's not so unusual to handle an error that is checked with 
assert() after all.

Cheers,
Daniel


More information about the Digitalmars-d mailing list