System::ConstCast 方法

System::ConstCast method

已弃用的强制转换已结束。

template<typename TTo,typename TFrom> CastResult<TTo>::type System::ConstCast(const SmartPtr<TFrom> &obj)
Parameter描述
TTo目标指向类型。
TFrom源指向类型。
ParameterType描述
objconst SmartPtr<TFrom>&源指针。

ReturnValue

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

备注

SmartPtr 对象执行 const 强制转换。

另见