Module macros

Module macros 

Source
Expand description

Holds several helpful macros related to primitives.

Macros§

length
Creates Length out of passed expression. If the expression is a literal integer value, then this will check the value at compile time instead of runtime. Otherwise it will produce potential runtime validity checks, depending on compiler’s optimizations.
offset
Creates Offset out of passed expression. If the expression is a literal integer value, then this will check the value at compile time instead of runtime. Otherwise it will produce potential runtime validity checks, depending on compiler’s optimizations.
try_unpack
This macro works as ? operator, but for CResult type.