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.

Reply via email to