System::Nullable::NullableBoolHelper method

Nullable::NullableBoolHelper method

Helper function to check if this and other are both not nulls and call a lambda if so. Used in implementation.s.

template<typename T1> bool System::Nullable<T>::NullableBoolHelper(const T1 &other, const std::function<bool()> &f, bool default_if_both_are_null=false) const
ParameterDescription
T1Other nullable type.
ParameterTypeDescription
otherconst T1&Other nullable value to compare to.
fconst std::function<bool()>&Lambda to call if both this and other are not nulls.
default_if_both_are_nullboolReturn value if both values are nulls.

ReturnValue

false if either this or other is null; default_if_both_are_null if both are null; result of f call if both are not null.

See Also