System::dynamic_pointer_cast 方法

System::dynamic_pointer_cast method

使用 dynamic_cast 对智能指针进行转换。

template<class Y,class X> SmartPtr<Y> System::dynamic_pointer_cast(SmartPtr<X> const &x)
参数描述
X源指针所指对象的类型。
Y目标指针所指对象的类型。
参数类型描述
xSmartPtr<X> const&源指针。

ReturnValue

转换后的指针。

另见