[#bsl-operator_eq-0ae7] = xref:bsl.adoc[bsl]::operator== :relfileprefix: ../ :mrdocs: Compare an optional object with a value for equality. == Synopsis Declared in `<bslstl_optional.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_LHS_TYPE, class t_RHS_TYPE> constexpr bool operator==( t_LHS_TYPE const& lhs, xref:bsl/optional-072.adoc[bsl::optional<t_RHS_TYPE>] const& rhs); ---- == Return Value `true` if `lhs` and `rhs` have the same value, and `false` otherwise == Parameters [cols="1,4"] |=== | Name| Description | *lhs* | left‐hand operand | *rhs* | right‐hand operand |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#