[#bsl-operator_eq-0cd9]
= xref:bsl.adoc[bsl]::operator&equals;&equals;
:relfileprefix: ../
:mrdocs:

Return whether `lhs` and `rhs` refer to the same object&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;sharedptr&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class LHS&lowbar;TYPE,
    class RHS&lowbar;TYPE&gt;
bool
operator&equals;&equals;(
    xref:bsl/shared_ptr-0a.adoc[shared&lowbar;ptr&lt;LHS&lowbar;TYPE&gt;] const& lhs,
    xref:bsl/shared_ptr-0a.adoc[shared&lowbar;ptr&lt;RHS&lowbar;TYPE&gt;] 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&semi; a compiler diagnostic will be emitted indicating the error unless a (raw) pointer to `LHS&lowbar;TYPE` can be compared to a (raw) pointer to `RHS&lowbar;TYPE`&period; Note that two shared pointers that compare equal do not necessarily manage the same object due to aliasing&period;

== Return Value

`true` if `lhs` and `rhs` refer to the same object

== Parameters

[cols="1,4"]
|===
| Name| Description
| *lhs*
| left&hyphen;hand side operand
| *rhs*
| right&hyphen;hand side operand
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
