I'm interested in what purpose various platforms / compilers ("implementations") / frameworks assign to the the C and C++ preprocessor macro NDEBUG
.
The C as well as the C++ standard only mention this definition once, namely to control the behavior of the assert()
macro.
I would ask to include only specific answers, where you know that a certain platform / framework / library for C or C++ uses the NDEBUG
definition to enable or disable anything else in addition to the standard defined assert()
macro.
One reason for asking this question has been that MS (Visual-C++) always(?) uses "their" _DEBUG
define to distinguish between debug and release stuff and I was wondering if this is a common practice for a library / platform to have their "own" debug define or whether other libraries / platforms use NDEBUG
for their debug related stuff.