System::SafeInvoke method

System::SafeInvoke method

Implementation of ‘?.’ operator translation.

template<typename T0,typename T1> static auto System::SafeInvoke(T0 &&expr, T1 &&func)
ParameterDescription
T0expression type.
T1Type of lambda encapsulating ‘WhenTrue’ expression.
ParameterTypeDescription
exprT0&&expression value.
funcT1&&‘WhenTrue’ expression bound to functor.

ReturnValue

If expr value is not null, returns func called with its value as first argument, otherwise returns null.

See Also