Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

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

Copy assignment.

Synopsis
storage_ptr&
operator=(
    storage_ptr const& other) noexcept;
Description

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.

Complexity

Constant.

Exception Safety

No-throw guarantee.

Parameters

Name

Description

other

The storage pointer to copy.


PrevUpHomeNext