boost::openmethod::virtual_traits<std::shared_ptr<Class> const&, Registry>::cast

Cast to another type.

Synopsis

template<class Other>
static
auto
cast(std::shared_ptr<Class> const& obj);

Description

Cast to a std::shared_ptr to another type. If possible, use std::static_pointer_cast. Otherwise, use std::dynamic_pointer_cast.

Return Value

A std::shared_ptr to the same object, cast to Derived::element_type.

Template Parameters

Name Description

Derived

A lvalue reference type to a std::shared_ptr.

Parameters

Name Description

obj

A reference to a const shared_ptr<Class>.

Created with MrDocs