CARB_UNLIKELY

Defined in carb/Defines.h

CARB_UNLIKELY(expr)

Defined as ([[unlikely]] !!(<expr>)) if the current compiler supports C++20. If the current compiler is GCC, as a fallback, __builtin_expect(!!(<expr>), 0) will be used. Otherwise, defined as (!!(<expr>))

Parameters
  • expr – The expression to evaluate, optimized with a false outcome likely and expected.

Returns

The boolean result of expr.