System::ObjectExt::CoalesceVoid method

ObjectExt::CoalesceVoid method

Implementation of ‘??’ operator in case when right part returns void (it throws, for example).

template<typename T0,typename T1> static T0 System::ObjectExt::CoalesceVoid(T0 value, T1 func)
ParameterDescription
T0LHS value type.
T1Type of lambda encapsulating RHS expression.
ParameterTypeDescription
valueT0LHS value.
funcT1RHS expression.

ReturnValue

Executes func when value is nullptr and returns value.

See Also