## SmartPtr::operator[] method


用于数组元素的访问器。仅在 [SmartPtr_](../smartptr_/) 为 [System::Array](../../array/) 的特化时编译。

```cpp
template<typename IdxType> decltype(System::Details::GetByIndex(std::declval<const SmartPtr_ *>(), std::declval<IdxType>())) System::SmartPtr<T>::operator[](IdxType idx) const
```


| 参数 | 描述 |
| --- | --- |
| IdxType | 索引的类型（假定为整数）。 |

| 参数 | 类型 | 描述 |
| --- | --- | --- |
| idx | IdxType | 数组中的索引。 |

### ReturnValue

[Array](../../array/) value at idx position.

## 另见

* Typedef [SmartPtr_](../smartptr_/)
* Class [SmartPtr](../)
* Namespace [System](../../)
* Library [Aspose.Font for C++](../../../)
tem::SmartPtr<T>::operator=(const SmartPtr_ &x)
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| x | const SmartPtr_\& | 指向复制赋值的指针。 |

### ReturnValue

对该对象的引用。

## 另见

* Typedef [SmartPtr_](../smartptr_/)
* Class [SmartPtr](../)
* Namespace [System](../../)
* Library [Aspose.Font for C++](../../../)
## SmartPtr::operator=(Pointee_ *) method


将原始指针赋给 [SmartPtr](../) 对象。

```cpp
SmartPtr_ & System::SmartPtr<T>::operator=(Pointee_ *p)
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| p | Pointee_ * | 要赋值的指针值。 |

### ReturnValue

对该对象的引用。

## 另见

* Typedef [SmartPtr_](../smartptr_/)
* Typedef [Pointee_](../pointee_/)
* Class [SmartPtr](../)
* Namespace [System](../../)
* Library [Aspose.Font for C++](../../../)
## SmartPtr::operator=(SmartPtr_\&&) method


移动赋值 [SmartPtr](../) 对象。x 将变得不可用。

```cpp
SmartPtr_ & System::SmartPtr<T>::operator=(SmartPtr_ &&x) noexcept
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| x | SmartPtr_\&& | 指向移动赋值的指针。 |

### ReturnValue

对该对象的引用。

## 另见

* Typedef [SmartPtr_](../smartptr_/)
* Class [SmartPtr](../)
* Namespace [System](../../)
* Library [Aspose.Font for C++](../../../)
## SmartPtr::operator=(std::nullptr_t) method


将指针值设为 nullptr。

```cpp
SmartPtr_ & System::SmartPtr<T>::operator=(std::nullptr_t)
```


### ReturnValue

对该对象的引用。

## 另见

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