In this recipe, we will learn how to leverage the NDEBUG macro, which stands for no debug. This recipe is important because most build systems automatically define this macro when a release or production build is compiled, which can be leveraged to disable debug logic when such a build is created.
Using #ifndef NDEBUG to conditionally execute additional checks
Getting ready
Before beginning, please ensure that all of the technical requirements are met, including the installation of Ubuntu 18.04 or higher and running the following in a Terminal window:
> sudo apt-get install build-essential git cmake
This will ensure that your operating system has the proper tools to compile and execute the examples in this recipe. Once...