boost::openmethod::virtual_traits<std::any&&, Registry>::cast
Cast to a type.
Synopsis
Declared in <boost/openmethod/interop/std_any.hpp>
template<typename U>
static
decltype(auto)
cast(std::any&& arg);
Description
If U is the any itself, returns arg unchanged, which is how a catch‐all overrider is written. Otherwise, extracts the stored value using std::any_cast, and registers U, stripped of reference and cv‐qualifiers, in Registry as a class derived from std::any.
Template Parameters
Name |
Description |
U |
The target type (e.g. |
Parameters
Name |
Description |
arg |
An rvalue reference to the |
Created with MrDocs