[#bsl-static_pointer_cast] = xref:bsl.adoc[bsl]::static_pointer_cast :relfileprefix: ../ :mrdocs: Return a `shared_ptr<TO_TYPE>` object sharing ownership of the same object as the specified `source` shared pointer to the (template parameter) `FROM_TYPE`, and referring to `static_cast<TO_TYPE *>(source.get())`. Note that if `source` cannot be statically cast to `TO_TYPE *`, then a compiler diagnostic will be emitted indicating the error. == Synopsis Declared in `<bslstl_sharedptr.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class TO_TYPE, class FROM_TYPE> xref:bsl/shared_ptr-0a.adoc[bsl::shared_ptr<TO_TYPE>] static_pointer_cast(xref:bsl/shared_ptr-0a.adoc[shared_ptr<FROM_TYPE>] const& source) noexcept; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#