@@ -7,7 +7,7 @@ <h1>General</h1>
7
7
8
8
This section provides alternatives to raw pointers for thread-safe atomic
9
9
pointer operations, and defines the < code > atomic_shared_ptr</ code > and
10
- < code > atomic_weak_ptr</ code > classes .
10
+ < code > atomic_weak_ptr</ code > class < del > es </ del > < ins > templates </ ins > .
11
11
12
12
</ p >
13
13
< p >
@@ -33,10 +33,21 @@ <h1>General</h1>
33
33
< h1 > Header <experimental/atomic> synopsis</ h1 >
34
34
35
35
< pre > < code >
36
- #include <memory>
36
+ #include << del > memory</ del > < ins > atomic</ ins > >
37
+
38
+ < ins >
39
+ namespace std {
40
+ namespace experimental {
41
+ inline namespace concurrency_v1 {
42
+ </ ins >
43
+ template <class T> struct atomic_shared_ptr;
44
+ template <class T> struct atomic_weak_ptr;
45
+ < ins >
46
+ } // namespace concurrency_v1
47
+ } // namespace experimental
48
+ } // namespace st
49
+ </ ins >
37
50
38
- template <class T> struct atomic_shared_ptr;
39
- template <class T> struct atomic_weak_ptr;
40
51
</ code > </ pre >
41
52
42
53
</ cxx-section >
@@ -77,7 +88,7 @@ <h1>Class template <code>atomic_shared_ptr</code></h1>
77
88
memory_order = memory_order_seq_cst) noexcept;
78
89
79
90
atomic_shared_ptr() noexcept = default;
80
- constexpr atomic_shared_ptr(shared_ptr<T>) noexcept;
91
+ < del > constexpr </ del > atomic_shared_ptr(shared_ptr<T>) noexcept;
81
92
atomic_shared_ptr(const atomic_shared_ptr&) = delete;
82
93
atomic_shared_ptr& operator=(const atomic_shared_ptr&) = delete;
83
94
atomic_shared_ptr& operator=(shared_ptr<T>) noexcept;
@@ -87,7 +98,7 @@ <h1>Class template <code>atomic_shared_ptr</code></h1>
87
98
} // namespace std</ code > </ pre >
88
99
< br >
89
100
< cxx-function >
90
- < cxx-signature > atomic_shared_ptr::atomic_shared_ptr() noexcept = default;</ cxx-signature >
101
+ < cxx-signature > < del > atomic_shared_ptr::</ del > atomic_shared_ptr() noexcept = default;</ cxx-signature >
91
102
< cxx-effects > Initializes the atomic object to an empty value.</ cxx-effects >
92
103
</ cxx-function >
93
104
@@ -103,11 +114,12 @@ <h1>Class template <code>atomic_weak_ptr</code></h1>
103
114
104
115
template <class T> struct atomic_weak_ptr {
105
116
bool is_lock_free() const noexcept;
106
-
107
117
void store(weak_ptr<T>, memory_order = memory_order_seq_cst) noexcept;
108
118
weak_ptr<T> load(memory_order = memory_order_seq_cst) const noexcept;
109
- operator weak_ptr<T>() const noexcept;
110
- weak_ptr<T> exchange(weak_ptr<T>, memory_order = memory_order_seq_cst) noexcept;
119
+ operator weak_ptr<T>() const noexcept;
120
+
121
+ weak_ptr<T> exchange(weak_ptr<T>,
122
+ memory_order = memory_order_seq_cst) noexcept;
111
123
112
124
bool compare_exchange_weak(weak_ptr<T>&, const weak_ptr<T>&,
113
125
memory_order, memory_order) noexcept;
@@ -128,7 +140,7 @@ <h1>Class template <code>atomic_weak_ptr</code></h1>
128
140
memory_order = memory_order_seq_cst) noexcept;
129
141
130
142
atomic_weak_ptr() noexcept = default;
131
- constexpr atomic_weak_ptr(weak_ptr<T>) noexcept;
143
+ < del > constexpr </ del > atomic_weak_ptr(weak_ptr<T>) noexcept;
132
144
atomic_weak_ptr(const atomic_weak_ptr&) = delete;
133
145
atomic_weak_ptr& operator=(const atomic_weak_ptr&) = delete;
134
146
atomic_weak_ptr& operator=(weak_ptr<T>) noexcept;
@@ -139,7 +151,7 @@ <h1>Class template <code>atomic_weak_ptr</code></h1>
139
151
</ code > </ pre >
140
152
< br >
141
153
< cxx-function >
142
- < cxx-signature > atomic_weak_ptr::atomic_weak_ptr() noexcept = default;</ cxx-signature >
154
+ < cxx-signature > < del > atomic_weak_ptr::</ del > atomic_weak_ptr() noexcept = default;</ cxx-signature >
143
155
< cxx-effects > Initializes the atomic object to an empty value.</ cxx-effects >
144
156
</ cxx-function >
145
157
< p >
0 commit comments