boost::openmethod::VirtualTraits::cast

Casts a virtual argument.

Synopsis

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.

Return Value

A value that can be passed as a U.

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