[#BloombergLP-bslstl-SharedPtrUtil-staticCast-013]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/SharedPtrUtil.adoc[SharedPtrUtil]::staticCast
:relfileprefix: ../../../
:mrdocs:

`staticCast` overloads

== Synopses

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

Return a `shared&lowbar;ptr` obtained by `static&lowbar;cast` from `source`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class TARGET,
    class SOURCE&gt;
static
xref:bsl/shared_ptr-0a.adoc[bsl::shared&lowbar;ptr&lt;TARGET&gt;]
xref:BloombergLP/bslstl/SharedPtrUtil/staticCast-0b.adoc[staticCast](xref:bsl/shared_ptr-0a.adoc[bsl::shared&lowbar;ptr&lt;SOURCE&gt;] const& source) noexcept;
----

[.small]#xref:BloombergLP/bslstl/SharedPtrUtil/staticCast-0b.adoc[_» more&period;&period;&period;_]#

Load `target` with a `static&lowbar;cast` alias of `source`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class TARGET,
    class SOURCE&gt;
static
void
xref:BloombergLP/bslstl/SharedPtrUtil/staticCast-014.adoc[staticCast](
    xref:bsl/shared_ptr-0a.adoc[bsl::shared&lowbar;ptr&lt;TARGET&gt;]* target,
    xref:bsl/shared_ptr-0a.adoc[bsl::shared&lowbar;ptr&lt;SOURCE&gt;] const& source);
----

[.small]#xref:BloombergLP/bslstl/SharedPtrUtil/staticCast-014.adoc[_» more&period;&period;&period;_]#

== Return Value

shared pointer obtained by `static&lowbar;cast` from `source`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *source*
| source shared pointer that supplies ownership
| *target*
| destination shared pointer loaded by the cast
|===


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