11.5. if_not_null macro

The IF_NOT_NULL module provides a null-safe call macro. The expression ptr |> if_not_null <| call(args) expands to a null check followed by a dereferenced call: if (ptr != null) { call(*ptr, args) }.

All functions and symbols are in “if_not_null” module, use require to get access to it.

require daslib/if_not_null

11.5.1. Call macros

if_not_null

This macro transforms guarded pointer access into null-safe inline code.