| Home | Libraries | People | FAQ | More

###### storage_ptr::operator= (2 of 2 overloads)

Copy assignment.

<h7> Synopsis </h7>

    storage_ptr&
    operator=(
        storage_ptr const& other);

<h7> Description </h7>

This function assigns a pointer that points to the same memory resource as `other`, with the same ownership:

- If `other` is non-owning, then `*this` will be be non-owning.
- If `other` has shared ownership, then `*this` will acquire shared ownership.

If `*this` previously had shared ownership, it is released before the function returns.

<h7> Complexity </h7>

Constant.

<h7> Exception Safety </h7>

No-throw guarantee.

<h7> Parameters </h7>

Name | Description
--- | ---
`other` | The storage pointer to copy.