[#beman-optional-operator_eq-0b] = xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::operator== :relfileprefix: ../../ :mrdocs: Compares a value against an engaged optional's 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==( T const& lhs, xref:beman/optional/optional-03.adoc[optional<U>] const& rhs) requires (!detail::is_optional<T>) && detail::optional_eq_rel<T, U>; ---- == Return Value `true` if `rhs` is engaged and `lhs` equals its contained value. == Parameters [cols="1,4"] |=== | Name| Description | *lhs* | The value operand. | *rhs* | The optional operand. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#