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

cast overloads

Synopses

Cast to another type.

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

Move‐cast to another type (since c++20)

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

Return Value

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

  • 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