auto operator=(const copy_on_write& x) noexcept -> copy_on_write&
auto operator=(copy_on_write&& x) noexcept -> copy_on_write&
template <class U>
auto operator=(U&& x) -> disable_copy_assign<U>

Assigns a copy_on_write

  1. Copy assignment.

  2. Move assignment.

  3. Forwarded element_type assignment

As with copy construction, assignment is a non-throwing operation which releases the old value and increments the reference count of the item being assigned to.

Return value