(C++) Preprocessor

January 9, 2018 · View on GitHub

 

 

 

 

 

(C++) Preprocessor

 

The preprocessor performs modifications (especially macro's) to source code, before compiling takes place.

 

The code below shows that the preprocessor directive '#define NDEBUG' lets the preprocessor remove all assert statements.

 


#define NDEBUG #include <cassert> int main() {   assert(1==2 && "Assume nonsense"); }