You copied the Doc URL to your clipboard.

__promise

__promise represents a promise you make to the compiler that a given expression always has a nonzero value. This enables the compiler to perform more aggressive optimization when vectorizing code.

Syntax

__promise(expr)

Where expr is an expression that evaluates to nonzero.

Usage

You must #include <assert.h> to use __promise(expr).

If assertions are enabled (by not defining NDEBUG) and the macro __DO_NOT_LINK_PROMISE_WITH_ASSERT is not defined, then the promise is checked at runtime by evaluating expr as part of assert(expr).