Conditional compilation: Which version identifier for release code ? version(assert) ?
Mike Parker
aldacron at gmail.com
Thu Aug 5 11:54:38 UTC 2021
On Thursday, 5 August 2021 at 10:43:01 UTC, wjoe wrote:
>
> Could you elaborate on ```version(assert)``` a bit more, please
> ? Like I compiled with ```-release, -g``` and without the 2
> options but the ```assert``` branch was always taken. Could it
> be that ```-unittest``` has something to do with it ?
Yes, -unittest overrides -release and enables asserts.
-check=assert=off overrides both.
I agree with Adam about avoiding -release. -debug is useful.
-release, not so much since we have finer control over
enabling/disabling checks these days.
More information about the Digitalmars-d-learn
mailing list