The standard C assert macro is disabled when the macro NDEBUG is defined, meaning “Not debug”. This leads to really awful double negative cases like #ifndef NDEBUG //DebuggingCode #endif. It seems like RELEASE would have been a better choice of terms, but I can’t believe the standards committee would have done it that way without some reason to do so….
The standard C assert macro is disabled when the macro NDEBUG is defined, meaning
Share
Having a macro RELEASE implies that the code is ready for distribution – when it may not. NDEBUG on the other hand implies that debugging is complete, hence ready for testing.
I also suppose that having to turn things off is better than having to make sure that you have turned everything on. That is why most OSs (for example) have most things switched on when a lot of people do not need it.
Just my humble thoughts.