Conditional compilation: Which version identifier for release code ? version(assert) ?

wjoe invalid at example.com
Thu Aug 5 09:18:08 UTC 2021


If it's to be determined whether or not the code is being 
compiled in debug or release mode, i.e. e.g. the dmd 
```-release``` or ```-g``` options, which version identifier is 
supposed to be used ?

There's no ```release``` identifier and ```-debug``` switch and 
```debug()``` condition are something else.

There's ```assert - Checks are being emitted for 
AssertExpressions```. With the exception for ```assert(0)```, 
those checks are omitted in release mode so this could be used 
for that purpose, right?





More information about the Digitalmars-d-learn mailing list