[#bsl-shared_ptr-0a-owner_before-02] = xref:bsl.adoc[bsl]::xref:bsl/shared_ptr-0a.adoc[shared_ptr]::owner_before :relfileprefix: ../../ :mrdocs: Return whether this `shared_ptr` precedes `other` in owner order. == Synopsis Declared in `<bslstl_sharedptr.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ANY_TYPE> bool owner_before(xref:bsl/shared_ptr-0a.adoc[shared_ptr<ANY_TYPE>] const& other) const noexcept; ---- == Description Return `true` if the address of the `BloombergLP::bslma::SharedPtrRep` object used by this shared pointer is ordered before the address of the `BloombergLP::bslma::SharedPtrRep` object used by the specified `other` shared pointer under the total ordering defined by `std::less<BloombergLP::bslma::SharedPtrRep *>`, and `false` otherwise. == Return Value `true` if this pointer's ownership identity precedes `other` == Parameters [cols="1,4"] |=== | Name| Description | *other* | other pointer to compare or share ownership with |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#