beman::optional::operator==

Compares two optionals for equality.

Synopsis

Declared in <beman/optional/optional.hpp>

template<
    typename T,
    typename U>
constexpr
bool
operator==(
    optional<T> const& lhs,
    optional<U> const& rhs)
requires detail::optional_eq_rel<T, U>;

Return Value

true if both are disengaged, or both are engaged and their contained values are equal.

Parameters

NameDescription
lhsThe left-hand optional.
rhsThe right-hand optional.