Skip to content

Glossary: C++ Beyond the Basics

assert

Also written: assert(cond), <cassert>

A macro from `<cassert>` that stops the program if its condition is false, used as a bug check. It is disabled when `NDEBUG` is defined, as in CMake's Release build type.

Where the book teaches it

Related terms

Release buildDebug build