System::Cast 方法

System::Cast method

SmartPtr 对象执行强制转换。

template<typename TTo,typename TFrom> std::enable_if<!IsExceptionWrapper<TTo>::value, typenameCastResult<TTo>::type>::type System::Cast(SmartPtr<TFrom> const &obj)
参数描述
TTo目标指向对象的类型。
TFrom源指向对象的类型。
参数类型描述
objSmartPtr<TFrom> const&源指针。

ReturnValue

如果允许转换,则返回转换结果。

另见