checkedint call removal

John Colvin via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 31 01:30:56 PDT 2014


On Wednesday, 30 July 2014 at 18:23:06 UTC, Daniel Murphy wrote:
> "John Colvin"  wrote in message 
> news:oyzjykmvgzdzkprzujzx at forum.dlang.org...
>
>> > Don't use -release.
>>
>> haha yeah, or that!
>
> debug enforce(...) would also work just fine.  It depends if 
> you're happy with leaving bounds checking enabled, if you want 
> fine-grained control over which checks get enabled, if your 
> code needs to be nothrow, etc
>
> I often write quick scripts that rely on bounds checking and 
> assertions to reject incorrect command line args.  While this 
> is technically an abuse of assert, it doesn't matter because I 
> never use -release on them.

version(assert) {} else static assert("This module needs it's 
assertions");
version(D_NoBoundsChecks) static assert("This module needs it's 
bounds checking");


More information about the Digitalmars-d mailing list