boost::openmethod::virtual_traits<virtual_any<Any, Registry> const&, Registry>::cast
Cast to a type.
Synopsis
Declared in <boost/openmethod/interop/virtual_any.hpp>
template<typename U>
static
decltype(auto)
cast(virtual_any<Any, Registry> const& arg);
Description
If U is the virtual_any itself (by any reference category), returns arg unchanged. Otherwise, extracts the stored value using virtual_traits<const Any&, Registry>::cast, and registers U, stripped of reference and cv‐qualifiers, in Registry as a class derived from Any. Since the any is not modifiable, U cannot be a mutable reference.
Parameters
Name |
Description |
arg |
A reference to a const |
Created with MrDocs