Assertion macros¶
-
BLACK_ASSERT_DISABLE¶
If defined, disables the
black_assert
macro.
-
black_assert(Expr)¶
Asserts that Expr must evaluate to true.
- Parameters:
Expr – bool expression that must evaluate to true.
- Throws:
bad_assert
if Expr is false.
-
black_unreachable()¶
Specifies that the current line of code is unreachable.
- Throws:
-
black_assume(Expr, Loc, Message)¶
Specifies that the current function assumes that Expr evaluates to true.
- Parameters:
Expr – bool expression that is assumed to be true
Loc –
std::source_location
value of the functionMessage – const char * message to show in case of failure
- Throws:
bad_assumption
in case of failure