boost::openmethod::virtual_traits<std::shared_ptr<Class>, Registry>::cast
Move‐cast to another type (since c++20)
Synopsis
Declared in <boost/openmethod/interop/std_shared_ptr.hpp>
template<class Derived>
static
decltype(auto)
cast(std::shared_ptr<Class>&& obj);
Description
Cast to a std::shared_ptr xvalue reference to another type. If possible, use std::static_pointer_cast. Otherwise, use std::dynamic_pointer_cast.
|
This overload is only available for C++20 and above, because rvalue references overloads of |
Return Value
A std::shared_ptr&& to the same object, cast to Derived::element_type.
Template Parameters
Name |
Description |
Derived |
A xvalue reference to a |
Parameters
Name |
Description |
obj |
A xvalue reference to a |
Created with MrDocs