CARB_CHECK
Defined in carb/Defines.h
-
CARB_CHECK(cond, ...)
Optionally performs a runtime check assertion, by default for both debug and release builds.
The implementation can be overridden on the command line, or by defining to a different implementation before including this file.
When
cond
produces afalse
result, the failure is reported to theg_carbAssert
assertion handler, or if that global variable isnullptr
, calls carb::assertHandlerFallback(). Depending on the result from that function call, execution is allowed to continue, orCARB_BREAK_POINT()
is invoked to notify the debugger.Note
The CARB_CHECK_ENABLED define can be used to determine if runtime check asserts are enabled, or to cause them to be enabled or disabled by defining it before including this file.
Warning
The
cond
should have no side effects! Asserts can be disabled which will causecond
to not be evaluated.- Parameters
cond – A condition that is evaluated for a boolean result. If the condition produces
false
, the assert handler is notified.... – An optional printf-style format string and variadic parameters.