On this page
assert.h
Prev: errno.h | Up: stdlib | Next: math.h
Rel: math, time & assert Guide, c/builtins
Ref: cppreference โ <assert.h>
Tags: #public #prog #c #stdlib #assert #index
Include
#include <assert.h>
Overview
Debug runtime invariant checks (assert) and compile-time checks (static_assert).
Core (#tier/core)
- assert โ Aborts with file, line, and failed expression if
expr == 0(disabled when-DNDEBUGis defined). - static_assert โ Compile-time assertion alias for
_Static_assert(keyword in C23).
Linked from
Related notes
- tuts/c/stdlib Linked here; links to this page; shared tags: #c, #index, #prog, #stdlib
- tuts/c/stdlib/assert/assert Linked here; links to this page; shared tags: #assert, #c, #prog, #stdlib
- tuts/c/stdlib/assert/static_assert Linked here; links to this page; shared tags: #assert, #c, #prog, #stdlib
- tuts/c/stdlib/errno Linked here; links to this page; shared tags: #c, #index, #prog, #stdlib
- tuts/c/stdlib/math Linked here; links to this page; shared tags: #c, #index, #prog, #stdlib
- tuts/c/builtins Linked here; shared tags: #c, #index, #prog
- tuts/c/stdlib/errno/errno links to this page; shared tags: #c, #prog, #stdlib
- tuts/c/stdlib/math_time_and_assert Linked here; shared tags: #c, #prog, #stdlib
- tuts/c/stdlib/ctype shared tags: #c, #index, #prog, #stdlib
- tuts/c/stdlib/limits shared tags: #c, #index, #prog, #stdlib