Skip to content

Commit 224384a

Browse files
committed
[atomic] Consistently order atomic<...> and atomic_ref<...> definitions:
keep compare_exchange and fetch_* operations together because the latter are a particular form of compare_exchange operation.
1 parent 7445919 commit 224384a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

source/atomics.tex

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,10 +1150,6 @@
11501150
bool compare_exchange_strong(@\placeholder{integral}@&, @\placeholder{integral}@,
11511151
memory_order = memory_order_seq_cst) const noexcept;
11521152

1153-
void wait(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) const noexcept;
1154-
void notify_one() noexcept;
1155-
void notify_all() noexcept;
1156-
11571153
@\placeholdernc{integral}@ fetch_add(@\placeholdernc{integral}@,
11581154
memory_order = memory_order_seq_cst) const noexcept;
11591155
@\placeholdernc{integral}@ fetch_sub(@\placeholdernc{integral}@,
@@ -1165,6 +1161,10 @@
11651161
@\placeholdernc{integral}@ fetch_xor(@\placeholdernc{integral}@,
11661162
memory_order = memory_order_seq_cst) const noexcept;
11671163

1164+
void wait(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) const noexcept;
1165+
void notify_one() noexcept;
1166+
void notify_all() noexcept;
1167+
11681168
@\placeholdernc{integral}@ operator++(int) const noexcept;
11691169
@\placeholdernc{integral}@ operator--(int) const noexcept;
11701170
@\placeholdernc{integral}@ operator++() const noexcept;
@@ -1281,15 +1281,15 @@
12811281
bool compare_exchange_strong(@\placeholder{floating-point}@&, @\placeholdernc{floating-point}@,
12821282
memory_order = memory_order_seq_cst) const noexcept;
12831283

1284-
void wait(@\placeholdernc{floating-point}@, memory_order = memory_order::seq_cst) const noexcept;
1285-
void notify_one() noexcept;
1286-
void notify_all() noexcept;
1287-
12881284
@\placeholder{floating-point}@ fetch_add(@\placeholdernc{floating-point}@,
12891285
memory_order = memory_order_seq_cst) const noexcept;
12901286
@\placeholder{floating-point}@ fetch_sub(@\placeholdernc{floating-point}@,
12911287
memory_order = memory_order_seq_cst) const noexcept;
12921288

1289+
void wait(@\placeholdernc{floating-point}@, memory_order = memory_order::seq_cst) const noexcept;
1290+
void notify_one() noexcept;
1291+
void notify_all() noexcept;
1292+
12931293
@\placeholder{floating-point}@ operator+=(@\placeholder{floating-point}@) const noexcept;
12941294
@\placeholder{floating-point}@ operator-=(@\placeholder{floating-point}@) const noexcept;
12951295
};
@@ -1382,13 +1382,13 @@
13821382
bool compare_exchange_strong(T*&, T*,
13831383
memory_order = memory_order_seq_cst) const noexcept;
13841384

1385+
T* fetch_add(difference_type, memory_order = memory_order_seq_cst) const noexcept;
1386+
T* fetch_sub(difference_type, memory_order = memory_order_seq_cst) const noexcept;
1387+
13851388
void wait(T*, memory_order = memory_order::seq_cst) const noexcept;
13861389
void notify_one() noexcept;
13871390
void notify_all() noexcept;
13881391

1389-
T* fetch_add(difference_type, memory_order = memory_order_seq_cst) const noexcept;
1390-
T* fetch_sub(difference_type, memory_order = memory_order_seq_cst) const noexcept;
1391-
13921392
T* operator++(int) const noexcept;
13931393
T* operator--(int) const noexcept;
13941394
T* operator++() const noexcept;

0 commit comments

Comments
 (0)