System::ConstCast 方法

System::ConstCast method

已弃用的转换已结束。

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

ReturnValue

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

备注

SmartPtr 对象执行 const 转换。

另见