RefOrNull4 method

P RefOrNull4(
  1. X? o
)

Writes o into slot '4' and returns its pointer, or returns nullptr if o is null.

Use this instead of Ref4 when the C API uses a null pointer to signal "no value".

Implementation

P RefOrNull4(X? o) => o == null ? nullptrFactory() : Ref4(o);