On Thu, 18 Jun 2009 17:46:37 +0400, Max Samukha <[email protected]> wrote:

On Thu, 18 Jun 2009 17:12:25 +0400, "Denis Koroskin"
<[email protected]> wrote:

On Thu, 18 Jun 2009 17:09:12 +0400, Qian Xu <[email protected]>
wrote:

Denis Koroskin wrote:

No, they wont.

Is there any reason for that?

I dont know. I'd prefer to write

debug assert(foo == bar, "foo must be equal to bar");

if I'd like to turn them off in release mode.

'debug' is not necessary in most cases because asserts are removed
from release builds unless the assert condition is known to be false
at compile time, in which case a hlt instruction is generated for the
assert in release mode.

You must have misunderstood my post.

I know that asserts are removed in release mode. Why question was, why they are removed? I responded that I personally see no reason in removing them in release mode. I wrote that if I were to remove my asserts in release, I would prepend them with "debug":

debug assert(condition, errorMessage);

Reply via email to