checkedint call removal
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Fri Aug 1 02:08:02 PDT 2014
On 8/1/2014 1:31 AM, John Colvin wrote:
> Don't want the optimiser to use the information from your asserts when the
> asserts are gone?
You can always do:
version(assert) { if (!exp) halt(); }
and in -release mode, the compiler won't assume that exp is true. Or, more
simply, just write your own myAssert() template. The compiler won't recognize it
as special, it will just be ordinary code with ordinary behavior as the
implementor wrote it. There's nothing difficult about it.
More information about the Digitalmars-d
mailing list