CARB_LIKELY
Defined in carb/Defines.h
-
CARB_LIKELY(expr)
Defined as
([[likely]] !!(<expr>))
if the current compiler supports C++20. If the current compiler is GCC, as a fallback,__builtin_expect(!!(<expr>), 1)
will be used. Otherwise, defined as(!!(<expr>))
- Parameters
expr – The expression to evaluate, optimized with a
true
outcome likely and expected.
- Returns
The boolean result of
expr
.