Concept断言
assert
C 标准库中提供的一种调试期断言机制,通过 <cassert> 头文件定义,当表达式为假时终止程序,常与 NDEBUG 宏绑定在发布构建中被移除
Timeline (last 90 days)
Oct 16
When NDEBUG is defined (usually in Release builds), the assert macro is expanded to a no-op.
Unverified50%
Oct 15
When the NDEBUG macro is defined, the standard header <cassert> expands assert(expr) into an empty statement, thereby completely removing the assertion at compile time.
Unverified50%