Unfortunately I think this is wrongly incompatible, as Andreas said.
e.g., consider:
#ifndef NDEBUG
static int checker () { ... }
#endif
...
assert (checker () == 0);
...
Or even worse, it could be hairy macros so that under NDEBUG
the expression is actually unparseable.
Thanks,
Roland