BloombergLP::bslstl::SharedPtrUtil::staticCast

staticCast overloads

Synopses

Declared in <bslstl_sharedptr.h>

Return a shared_ptr obtained by static_cast from source.

template<
    class TARGET,
    class SOURCE>
static
bsl::shared_ptr<TARGET>
staticCast(bsl::shared_ptr<SOURCE> const& source) noexcept;
» more...

Load target with a static_cast alias of source.

template<
    class TARGET,
    class SOURCE>
static
void
staticCast(
    bsl::shared_ptr<TARGET>* target,
    bsl::shared_ptr<SOURCE> const& source);
» more...

Return Value

shared pointer obtained by static_cast from source

Parameters

NameDescription
sourcesource shared pointer that supplies ownership
targetdestination shared pointer loaded by the cast