[saferecl.hp.holder.general]

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

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

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

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

#### 32.11.3.4.1 General [saferecl.hp.holder.general]

namespace std {class hazard_pointer {public: hazard_pointer() noexcept;
 hazard_pointer(hazard_pointer&&) noexcept;
 hazard_pointer& operator=(hazard_pointer&&) noexcept; ~hazard_pointer(); bool empty() const noexcept; template<class T> T* protect(const atomic<T*>& src) noexcept; template<class T> bool try_protect(T*& ptr, const atomic<T*>& src) noexcept; template<class T> void reset_protection(const T* ptr) noexcept; void reset_protection(nullptr_t = nullptr) noexcept; void swap(hazard_pointer&) noexcept; };}

[1](#1)

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

An object of type hazard_pointer is either empty or[*owns*](#def:owning,hazard_pointer "32.11.3.4.1 General [saferecl.hp.holder.general]") a hazard pointer[.](#1.sentence-1)

Each hazard pointer is owned by
exactly one object of type hazard_pointer[.](#1.sentence-2)

[*Note [1](#note-1)*:

An empty hazard_pointer object is different from
a hazard_pointer object
that owns an unassociated hazard pointer[.](#1.sentence-3)

An empty hazard_pointer object does not own any hazard pointers[.](#1.sentence-4)

â *end note*]
