From Jason Turner

[saferecl.hp.holder.general]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpchag2lst/{from.md → to.md} +30 -0
tmp/tmpchag2lst/{from.md → to.md} RENAMED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ##### General <a id="saferecl.hp.holder.general">[[saferecl.hp.holder.general]]</a>
2
+
3
+ ``` cpp
4
+ namespace std {
5
+ class hazard_pointer {
6
+ public:
7
+ hazard_pointer() noexcept;
8
+ hazard_pointer(hazard_pointer&&) noexcept;
9
+ hazard_pointer& operator=(hazard_pointer&&) noexcept;
10
+ ~hazard_pointer();
11
+
12
+ bool empty() const noexcept;
13
+ template<class T> T* protect(const atomic<T*>& src) noexcept;
14
+ template<class T> bool try_protect(T*& ptr, const atomic<T*>& src) noexcept;
15
+ template<class T> void reset_protection(const T* ptr) noexcept;
16
+ void reset_protection(nullptr_t = nullptr) noexcept;
17
+ void swap(hazard_pointer&) noexcept;
18
+ };
19
+ }
20
+ ```
21
+
22
+ An object of type `hazard_pointer` is either empty or *owns* a hazard
23
+ pointer. Each hazard pointer is owned by exactly one object of type
24
+ `hazard_pointer`.
25
+
26
+ [*Note 1*: An empty `hazard_pointer` object is different from a
27
+ `hazard_pointer` object that owns an unassociated hazard pointer. An
28
+ empty `hazard_pointer` object does not own any hazard
29
+ pointers. — *end note*]
30
+