tmp/tmp9f2a081w/{from.md → to.md}
RENAMED
|
@@ -10,11 +10,13 @@ Correct contradictory wording and improve implementation flexibility for
|
|
| 10 |
performance. **Effect on original feature:** Valid C++20 code using a
|
| 11 |
barrier might have different semantics in this revision of C++ if it
|
| 12 |
depends on a completion function’s side effects occurring exactly once,
|
| 13 |
on a specific thread running the phase completion step, or on a
|
| 14 |
completion function’s side effects occurring without `wait` having been
|
| 15 |
-
called.
|
|
|
|
|
|
|
| 16 |
|
| 17 |
``` cpp
|
| 18 |
auto b0 = std::barrier(1);
|
| 19 |
b0.arrive();
|
| 20 |
b0.arrive(); // implementation-defined; previously well-defined
|
|
@@ -24,5 +26,7 @@ auto b1 = std::barrier(1, [&] { data++; });
|
|
| 24 |
b1.arrive();
|
| 25 |
assert(data == 1); // implementation-defined; previously well-defined
|
| 26 |
b1.arrive(); // implementation-defined; previously well-defined
|
| 27 |
```
|
| 28 |
|
|
|
|
|
|
|
|
|
| 10 |
performance. **Effect on original feature:** Valid C++20 code using a
|
| 11 |
barrier might have different semantics in this revision of C++ if it
|
| 12 |
depends on a completion function’s side effects occurring exactly once,
|
| 13 |
on a specific thread running the phase completion step, or on a
|
| 14 |
completion function’s side effects occurring without `wait` having been
|
| 15 |
+
called.
|
| 16 |
+
|
| 17 |
+
[*Example 1*:
|
| 18 |
|
| 19 |
``` cpp
|
| 20 |
auto b0 = std::barrier(1);
|
| 21 |
b0.arrive();
|
| 22 |
b0.arrive(); // implementation-defined; previously well-defined
|
|
|
|
| 26 |
b1.arrive();
|
| 27 |
assert(data == 1); // implementation-defined; previously well-defined
|
| 28 |
b1.arrive(); // implementation-defined; previously well-defined
|
| 29 |
```
|
| 30 |
|
| 31 |
+
— *end example*]
|
| 32 |
+
|