[#beman-optional-operator_eq-09] = xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::operator== :relfileprefix: ../../ :mrdocs: Compares an engaged optional's value against a value for equality. == Synopsis Declared in `<beman/optional/optional.hpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename T, typename U> constexpr bool operator==( xref:beman/optional/optional-03.adoc[optional<T>] const& lhs, U const& rhs) requires (!detail::is_optional<U>) && detail::optional_eq_rel<T, U>; ---- == Return Value `true` if `lhs` is engaged and its contained value equals `rhs.` == Parameters [cols="1,4"] |=== | Name| Description | *lhs* | The optional operand. | *rhs* | The value operand. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#