Skip to content

Commit 73c862c

Browse files
committed
Merge 2017-11 LWG Motion 10
2 parents 71a1324 + ae6e901 commit 73c862c

File tree

5 files changed

+156
-134
lines changed

5 files changed

+156
-134
lines changed

source/algorithms.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,9 +1376,9 @@
13761376
std::atomic<int> x{0};
13771377
int a[] = {1,2};
13781378
std::for_each(std::execution::par, std::begin(a), std::end(a), [&](int) {
1379-
x.fetch_add(1, std::memory_order_relaxed);
1379+
x.fetch_add(1, std::memory_order::relaxed);
13801380
// spin wait for another iteration to change the value of \tcode{x}
1381-
while (x.load(std::memory_order_relaxed) == 1) { } // incorrect: assumes execution order
1381+
while (x.load(std::memory_order::relaxed) == 1) { } // incorrect: assumes execution order
13821382
});
13831383
\end{codeblock}
13841384
The above example depends on the order of execution of the iterations, and

0 commit comments

Comments
 (0)