CARB_ASSERT#
Defined in carb/Defines.h
-
CARB_ASSERT(cond, ...)#
Optionally performs an assertion, by default for debug builds only.
The implementation can be overridden on the command line, or by defining to a different implementation before including this file.
When
condproduces afalseresult, the failure is reported to theg_carbAssertassertion 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_ASSERT_ENABLED define can be used to determine if asserts are enabled, or to cause them to be enabled or disabled by defining it before including this file.
Warning
The
condshould have no side effects! Asserts can be disabled which will causecondto 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.