[util.smartptr.weak.mod]

# 20 Memory management library [[mem]](./#mem)

## 20.3 Smart pointers [[smartptr]](smartptr#util.smartptr.weak.mod)

### 20.3.2 Shared-ownership pointers [[util.sharedptr]](util.sharedptr#util.smartptr.weak.mod)

#### 20.3.2.3 Class template weak_ptr [[util.smartptr.weak]](util.smartptr.weak#mod)

#### 20.3.2.3.5 Modifiers [util.smartptr.weak.mod]

[ð](#lib:swap,weak_ptr)

`constexpr void swap(weak_ptr& r) noexcept;
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L5030)

*Effects*: Exchanges the contents of *this and r[.](#1.sentence-1)

[ð](#lib:reset,weak_ptr)

`constexpr void reset() noexcept;
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L5041)

*Effects*: Equivalent to weak_ptr().swap(*this)[.](#2.sentence-1)
