BloombergLP::bdlb::operator==

Return whether the specified lhs and rhs have the same value.

Synopsis

Declared in <bdlb_nullablevalue.h>

template<
    class LHS_TYPE,
    class RHS_TYPE>
bool
operator==(
    NullableValue<LHS_TYPE> const& lhs,
    NullableValue<RHS_TYPE> const& rhs)
requires requires {
        { *lhs == *rhs } -> NullableValue_ConvertibleToBool;
    };

Description

Return true if the specified lhs and rhs nullable objects have the same value, and false otherwise. Two nullable objects have the same value if both are null, or if both are non-null and the values of their underlying objects compare equal. Note that this function will fail to compile if LHS_TYPE and RHS_TYPE are not compatible.

Return Value

true if the operands have the same value, and false otherwise

Parameters

NameDescription
lhsleft-hand operand
rhsright-hand operand