---
title: operator=
framework: driverkit
role: symbol
role_heading: Method Template
path: driverkit/ossharedptr/operator=-5z7no
---

# operator=

## Declaration

```occ
template <typename U, typename = std::std::enable_if_t<std::is_convertible_v<U *, T *>>> OSSharedPtr<T> & operator=(const OSSharedPtr<U> & other);
```
