assume, assert, enforce, @safe

eles via Digitalmars-d digitalmars-d at puremagic.com
Fri Aug 1 22:56:59 PDT 2014


On Friday, 1 August 2014 at 20:22:39 UTC, Tofu Ninja wrote:
> On Friday, 1 August 2014 at 20:16:29 UTC, eles wrote:
>
>> Yes, but is the same for the C apps. There, you have no 
>> assertion in the release build, the release build is optimized 
>> (I imagine very few would use -O0 on it...), then the sefault 
>> happens.
>>
>
> In c the assert is just a check, no assume, the Microsoft 
> compiler even has its own __assume separate from assert.

Because the assert is in the library, not in the language. The 
compiler can make only limited use of it.


More information about the Digitalmars-d mailing list