## System::static_pointer_cast method


使用 static_cast 转换智能指针。

```cpp
template<class Y,class X> SmartPtr<Y> System::static_pointer_cast(SmartPtr<X> const &x)
```


| 参数 | 描述 |
| --- | --- |
| X | 源指针所指对象的类型。 |
| Y | 目标指针所指对象的类型。 |

| 参数 | 类型 | 描述 |
| --- | --- | --- |
| x | SmartPtr\<X\> const\& | 源指针。 |

### ReturnValue

转换后的指针。

## 另见

* Class [SmartPtr](../smartptr/)
* Namespace [System](../)
* Library [Aspose.Font for C++](../../)
