checkedint call removal

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 31 21:43:00 PDT 2014


On 7/31/2014 1:18 AM, Daniel Murphy wrote:
> In this program the enforce can be removed
>
> assert(x < y);
> enforce(x < y);
>
> But not in this one:
>
> enforce(x < y);
> assert(x < y);
>
> because the compiler does need to take control flow into account when applying
> the information in the assert.  In this case the assert does not actually give
> the compiler any new information.

http://imgur.com/gallery/hzaJ4Hn


More information about the Digitalmars-d mailing list