Compares an engaged optional's value against a value for equality.
Declared in <beman/optional/optional.hpp>
template<
typename T,
typename U>
constexpr
bool
operator==(
optional<T> const& lhs,
U const& rhs)
requires (!detail::is_optional<U>) && detail::optional_eq_rel<T, U>;
true if lhs is engaged and its contained value equals rhs.
| Name | Description |
|---|---|
| lhs | The optional operand. |
| rhs | The value operand. |