std1.0.0-beta-7 SafeC docs

std :: assert

Function std::runtime_assert_at

#include <std/assert.h> source ยท definition

void runtime_assert_at(int cond, const &char msg, const &char file, int line)

Assert that cond is true at runtime, reporting the given location. On failure: prints "Assertion failed: <msg> at <file>:<line>" to stderr and calls abort(). Pass FILE and LINE for the call site:

runtime_assert_at(ptr != 0, "pointer must not be null", __FILE__, __LINE__);