[#bsl-operator_eq-0cd9] = xref:bsl.adoc[bsl]::operator== :relfileprefix: ../ :mrdocs: Return whether `lhs` and `rhs` refer to the same object. == Synopsis Declared in `<bslstl_sharedptr.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class LHS_TYPE, class RHS_TYPE> bool operator==( xref:bsl/shared_ptr-0a.adoc[shared_ptr<LHS_TYPE>] const& lhs, xref:bsl/shared_ptr-0a.adoc[shared_ptr<RHS_TYPE>] const& rhs) noexcept; ---- == Description Return `true` if the specified `lhs` shared pointer refers to the same object (if any) as that referred to by the specified `rhs` shared pointer (if any), and `false` otherwise; a compiler diagnostic will be emitted indicating the error unless a (raw) pointer to `LHS_TYPE` can be compared to a (raw) pointer to `RHS_TYPE`. Note that two shared pointers that compare equal do not necessarily manage the same object due to aliasing. == Return Value `true` if `lhs` and `rhs` refer to the same object == Parameters [cols="1,4"] |=== | Name| Description | *lhs* | left‐hand side operand | *rhs* | right‐hand side operand |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#