[#bsl-enable_shared_from_this-shared_from_this-0ab] = xref:bsl.adoc[bsl]::xref:bsl/enable_shared_from_this.adoc[enable_shared_from_this]::shared_from_this :relfileprefix: ../../ :mrdocs: Return a `shared_ptr<const ELEMENT_TYPE>` that shares ownership with an existing `shared_ptr` object that managed this object, and throw a `std::bad_weak_ptr` exception if there is no `shared_ptr` currently managing this object. If multiple groups of `shared_ptr`s are managing this object, the returned `shared_ptr` will share ownership with the group that first managed this object. == Synopsis Declared in `<bslstl_sharedptr.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/shared_ptr-0a.adoc[bsl::shared_ptr<ELEMENT_TYPE const>] shared_from_this() const; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#