[saferecl.hp.holder.nonmem]

# 32 Concurrency support library [[thread]](./#thread)

## 32.11 Safe reclamation [[saferecl]](saferecl#hp.holder.nonmem)

### 32.11.3 Hazard pointers [[saferecl.hp]](saferecl.hp#holder.nonmem)

#### 32.11.3.4 Class hazard_pointer [[saferecl.hp.holder]](saferecl.hp.holder#nonmem)

#### 32.11.3.4.4 Non-member functions [saferecl.hp.holder.nonmem]

[ð](#lib:make_hazard_pointer)

`hazard_pointer make_hazard_pointer();
`

[1](#1)

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

*Effects*: Constructs a hazard pointer[.](#1.sentence-1)

[2](#2)

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

*Returns*: A hazard_pointer object that owns the newly-constructed hazard pointer[.](#2.sentence-1)

[3](#3)

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

*Throws*: May throw bad_alloc if memory for the hazard pointer could not be allocated[.](#3.sentence-1)

[ð](#lib:swap,hazard_pointer)

`void swap(hazard_pointer& a, hazard_pointer& b) noexcept;
`

[4](#4)

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

*Effects*: Equivalent to a.swap(b)[.](#4.sentence-1)
