System::ForceStaticCast 方法

System::ForceStaticCast method

SmartPtr 对象执行真实的 static_cast。

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

ReturnValue

如果允许转换则返回转换结果,否则行为未定义。

另见