boost::openmethod::VirtualTraits::cast
Casts a virtual argument.
Synopsis
Declared in <boost/openmethod/core.hpp>
template<typename U>
static
/* implementation-defined */
cast(T arg);
Description
cast is responsible for passing virtual arguments from method to overrider. In general, this requires some form of adjustment, because a virtual parameter in the overrider usually has a different type than the corresponding parameter in the method. Typically, the adjustment consists of a cast, performed via static_cast, dynamic_cast, or other means, depending on the type of the argument and the rtti policy of the method. cast may return the adjusted argument by reference or as a temporary value.
Template Parameters
| Name | Description |
|---|---|
T |
The type of the virtual parameter in the method. |
U |
The type of the virtual parameter in the overrider. |
Parameters
| Name | Description |
|---|---|
arg |
The argument passed to the method call. |
Created with MrDocs