How can I completely disable calls to assert()?

You must #define NDEBUG (or use the flag -DNDEBUG with g++) this will disable assert as long as it’s defined before the inclusion of the assert header file.

Leave a Comment