boost::openmethod::virtual_traits<std::unique_ptr<Class>, Registry>::cast
Cast to a type.
Synopsis
Declared in <boost/openmethod/interop/std_unique_ptr.hpp>
template<typename Derived>
static
auto
cast(std::unique_ptr<Class>&& ptr);
Description
Cast a reference to the managed object, using static_cast if possible, and Registry::rtti::dynamic_cast_ref otherwise. If the cast succeeds, transfer ownership to a std::unique_ptr to the target type, and return it.
Template Parameters
Name |
Description |
Derived |
A xvalue reference to a |
Parameters
Name |
Description |
obj |
A xvalue reference to a |
Created with MrDocs