System::Cast(SmartPtr<TFrom> const&) function
Performs cast on SmartPtr objects.
template<typename TTo,typename TFrom> std::enable_if<!IsExceptionWrapper<TTo>::value, typenameCastResult<TTo>::type>::type System::Cast(SmartPtr<TFrom> const &obj)
Template parameters
| Parameter | Description |
|---|
| TTo | Target pointee type. |
| TFrom | Source pointee type. |
Arguments
| Parameter | Type | Description |
|---|
| obj | SmartPtr<TFrom> const& | Source pointer. |
Return Value
Cast result if cast is allowed.
Exceptions
| Exception | Description |
|---|
| InvalidCastException | if cast is not allowed. |
See Also