-debug question

Ali Çehreli acehreli at yahoo.com
Fri Jan 21 02:46:00 UTC 2022


On 1/20/22 18:07, forkit wrote:
> I have a line of code, that I do NOT want executed when -debug is passed 
> in.
> 
> enforce(!exists(fname), "Oop! That file already exists!");
> 
> Is this even possible? (with using -version ..)
> 

The following should do it:

debug {} else {
    foo();
}

Ali


More information about the Digitalmars-d-learn mailing list