## SmartPtr::operator[] method


Accessor for array elements. Only compiles if [SmartPtr_](../smartptr_/) is specialization of [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
```


| Parameter | Description |
| --- | --- |
| IdxType | Type of index (assumed integral). |

| Parameter | Type | Description |
| --- | --- | --- |
| idx | IdxType | [Index](../../index/) in array. |

### ReturnValue

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

## See Also

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


| Parameter | Type | Description |
| --- | --- | --- |
| x | const SmartPtr_\& | Pointer to copy-assign. |

### ReturnValue

Reference to this object.

## See Also

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


Assigns raw pointer to [SmartPtr](../) object.

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


| Parameter | Type | Description |
| --- | --- | --- |
| p | Pointee_ * | Pointer value to assign. |

### ReturnValue

Reference to this object.

## See Also

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


Move-assigns [SmartPtr](../) object. x becomes unusable.

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


| Parameter | Type | Description |
| --- | --- | --- |
| x | SmartPtr_\&& | Pointer to move-assign. |

### ReturnValue

Reference to this object.

## See Also

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


Sets pointer value to nullptr.

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


### ReturnValue

Reference to this object.

## See Also

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